Linux/Paketverwaltung: Unterschied zwischen den Versionen

Aus Foxwiki
Die Seite wurde neu angelegt: „== Linux Package Management Übersicht == === Managing Packages === {| style="border-spacing:0;margin:auto;width:17.59cm;" |- ! align=center style="border-t…“
 
Keine Bearbeitungszusammenfassung
Zeile 4: Zeile 4:




{| style="border-spacing:0;margin:auto;width:17.59cm;"
{|  
|-
|-
! align=center style="border-top:0.75pt double #808080;border-bottom:0.05pt double #808080;border-left:0.75pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | Task
! | Task
! align=center style="border-top:0.75pt double #808080;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | apt (deb)
! | apt (deb)
! align=center style="border-top:0.75pt double #808080;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | yum (rpm)
! | yum (rpm)
! align=center style="border-top:0.75pt double #808080;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | zypper (rpm)
! | zypper (rpm)
|-
|-
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.75pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | '''Install from repository'''
| | '''Install from repository'''
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>apt-get install pkg-name</tt>
| |apt-get install pkg-name
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>yum install pkg-name</tt>
| |yum install pkg-name
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>zypper install pkg-name</tt>
| |zypper install pkg-name
|-
|-
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.75pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | '''Update package'''
| | '''Update package'''
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>apt-get install pkg-name</tt>
| |apt-get install pkg-name
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>yum update pkg-name</tt>
| |yum update pkg-name
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>zypper update -t package pkg-name</tt>
| |zypper update -t package pkg-name
|-
|-
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.75pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | '''Remove package'''
| | '''Remove package'''
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>apt-get remove pkg-name</tt>
| |apt-get remove pkg-name
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>yum erase pkg-name</tt>
| |yum erase pkg-name
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>zypper remove pkg-name</tt>
| |zypper remove pkg-name
|-
|-
| style="border-top:none;border-bottom:0.75pt double #808080;border-left:0.75pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | '''Install from package file'''
| | '''Install from package file'''
| style="border-top:none;border-bottom:0.75pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>dpkg -i pkg-name</tt>
| |dpkg -i pkg-name
| style="border-top:none;border-bottom:0.75pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>yum localinstall pkg-name</tt>
| |yum localinstall pkg-name
| style="border-top:none;border-bottom:0.75pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>zypper install pkg-name</tt>
| |zypper install pkg-name
|-
|-
|}
|}
Zeile 35: Zeile 35:




{| style="border-spacing:0;margin:auto;width:17.59cm;"
{|  
|-
|-
! align=center style="border-top:0.75pt double #808080;border-bottom:0.05pt double #808080;border-left:0.75pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | Task
! | Task
! align=center style="border-top:0.75pt double #808080;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | apt (deb)
! | apt (deb)
! align=center style="border-top:0.75pt double #808080;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | yum (rpm)
! | yum (rpm)
! align=center style="border-top:0.75pt double #808080;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | zypper (rpm)
! | zypper (rpm)
|-
|-
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.75pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | '''Search by package name'''
| | '''Search by package name'''
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>apt-cache search pkg-name</tt>
| |apt-cache search pkg-name
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>yum list pkg-name</tt>
| |yum list pkg-name
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>zypper search pkg-name</tt>
| |zypper search pkg-name
|-
|-
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.75pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | '''Search by pattern'''
| | '''Search by pattern'''
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>apt-cache search pattern</tt>
| |apt-cache search pattern
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>yum search pattern</tt>
| |yum search pattern
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>zypper search -t pattern pattern</tt>
| |zypper search -t pattern pattern
|-
|-
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.75pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | '''Search by file name'''
| | '''Search by file name'''
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>apt-file search path</tt>
| |apt-file search path
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>yum provides file</tt>
| |yum provides file
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>zypper wp file</tt>
| |zypper wp file
|-
|-
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.75pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | '''List installed packages'''
| | '''List installed packages'''
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>dpkg -l</tt>
| |dpkg -l
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>rpm -qa</tt>
| |rpm -qa
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>zypper search -is</tt>
| |zypper search -is
|-
|-
| style="border-top:none;border-bottom:0.75pt double #808080;border-left:0.75pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | '''Show package information'''
| | '''Show package information'''
| style="border-top:none;border-bottom:0.75pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>apt-cache show pgk-name</tt>
| |apt-cache show pgk-name
| style="border-top:none;border-bottom:0.75pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>yum info pkg-name</tt>
| |yum info pkg-name
| style="border-top:none;border-bottom:0.75pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>zypper info pkg-name</tt>
| |zypper info pkg-name
|-
|-
|}
|}
Zeile 71: Zeile 71:




{| style="border-spacing:0;margin:auto;width:17.59cm;"
{|  
|-
|-
! align=center style="border-top:0.75pt double #808080;border-bottom:0.05pt double #808080;border-left:0.75pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | Task
! | Task
! align=center style="border-top:0.75pt double #808080;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | apt (deb)
! | apt (deb)
! align=center style="border-top:0.75pt double #808080;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | yum (rpm)
! | yum (rpm)
! align=center style="border-top:0.75pt double #808080;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | zypper (rpm)
! | zypper (rpm)
|-
|-
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.75pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | '''Update package list'''
| | '''Update package list'''
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>apt-get update</tt>
| |apt-get update
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>yum check-update</tt>
| |yum check-update
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>zypper refresh</tt>
| |zypper refresh
|-
|-
| style="border-top:none;border-bottom:0.75pt double #808080;border-left:0.75pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | '''Update system'''
| | '''Update system'''
| style="border-top:none;border-bottom:0.75pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>apt-get upgrade</tt>
| |apt-get upgrade
| style="border-top:none;border-bottom:0.75pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>yum update</tt>
| |yum update
| style="border-top:none;border-bottom:0.75pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>zypper update</tt>
| |zypper update
|-
|-
|}
|}
Zeile 92: Zeile 92:




{| style="border-spacing:0;margin:auto;width:17.59cm;"
{|  
|-
|-
! align=center style="border-top:0.75pt double #808080;border-bottom:0.05pt double #808080;border-left:0.75pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | Task
! | Task
! align=center style="border-top:0.75pt double #808080;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | apt (deb)
! | apt (deb)
! align=center style="border-top:0.75pt double #808080;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | yum (rpm)
! | yum (rpm)
! align=center style="border-top:0.75pt double #808080;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | zypper (rpm)
! | zypper (rpm)
|-
|-
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.75pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | '''List repositories'''
| | '''List repositories'''
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>cat /etc/apt/sources.list</tt>
| |cat /etc/apt/sources.list
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>yum repolist</tt>
| |yum repolist
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>zypper repos</tt>
| |zypper repos
|-
|-
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.75pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | '''Add repository'''
| | '''Add repository'''
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | ''edit'' <tt>/etc/apt/sources.list</tt>
| | ''edit''/etc/apt/sources.list
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | ''add to'' <tt>/etc/yum.repos.d/</tt>
| | ''add to''/etc/yum.repos.d/
| style="border-top:none;border-bottom:0.05pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>zypper addrepo URI name</tt>
| |zypper addrepo URI name
|-
|-
| style="border-top:none;border-bottom:0.75pt double #808080;border-left:0.75pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | '''Remove repository'''
| | '''Remove repository'''
| style="border-top:none;border-bottom:0.75pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | ''edit'' <tt>/etc/apt/sources.list</tt>
| | ''edit''/etc/apt/sources.list
| style="border-top:none;border-bottom:0.75pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | ''remove from'' <tt>/etc/yum.repos.d/</tt>
| | ''remove from''/etc/yum.repos.d/
| style="border-top:none;border-bottom:0.75pt double #808080;border-left:0.05pt double #808080;border-right:0.75pt double #808080;padding:0.049cm;" | <tt>zypper removerepo name</tt>
| |zypper removerepo name
|-
|-
|}
|}

Version vom 15. Februar 2020, 17:46 Uhr

Linux Package Management Übersicht

Managing Packages

Task apt (deb) yum (rpm) zypper (rpm)
Install from repository apt-get install pkg-name yum install pkg-name zypper install pkg-name
Update package apt-get install pkg-name yum update pkg-name zypper update -t package pkg-name
Remove package apt-get remove pkg-name yum erase pkg-name zypper remove pkg-name
Install from package file dpkg -i pkg-name yum localinstall pkg-name zypper install pkg-name

Searching Packages

Task apt (deb) yum (rpm) zypper (rpm)
Search by package name apt-cache search pkg-name yum list pkg-name zypper search pkg-name
Search by pattern apt-cache search pattern yum search pattern zypper search -t pattern pattern
Search by file name apt-file search path yum provides file zypper wp file
List installed packages dpkg -l rpm -qa zypper search -is
Show package information apt-cache show pgk-name yum info pkg-name zypper info pkg-name

Updating System

Task apt (deb) yum (rpm) zypper (rpm)
Update package list apt-get update yum check-update zypper refresh
Update system apt-get upgrade yum update zypper update

Software Repositories

Task apt (deb) yum (rpm) zypper (rpm)
List repositories cat /etc/apt/sources.list yum repolist zypper repos
Add repository edit/etc/apt/sources.list add to/etc/yum.repos.d/ zypper addrepo URI name
Remove repository edit/etc/apt/sources.list remove from/etc/yum.repos.d/ zypper removerepo name