Difference between revisions of "Package management with apt and yum"

From docwiki
Jump to: navigation, search
(apt-get for debian based distributions)
 
Line 18: Line 18:
 
dpkg --list # list all installed packages
 
dpkg --list # list all installed packages
 
</pre>
 
</pre>
  +
  +
There is also a new '''apt''' tool that provides the functions of apt-get and apt-cache in one tool.
   
 
The list of available package sources is in /etc/apt/sources.list
 
The list of available package sources is in /etc/apt/sources.list

Latest revision as of 16:30, 7 November 2020


Motivation

Once you have your own Linux system you will want to install additional packages. This is really easy in Linux as Linux distributions come with a packet management system (kind of like the App-Store on your phone), where you only need to search for packets you want and then install them.

Most Linux distributions are either based on debian (E.g. debian, ubuntu, mint, ...) or on redhat (fedora, redhat, centOS, suse, ... ).

The redhat based distributions use yum as their package manager and the debian based use apt-get. Here are the most important commands for package management.

apt-get for debian based distributions

apt-get update   # reload the list of avialable packages (does NOT update any packages yet)
apt-get upgrade  # upgrades all packages (does NOT upgrade to a new major release)
apt-cache search something # find packages related to "something"
apt-get install packagename  # install package named "packagename"
dpkg --list                 # list all installed packages

There is also a new apt tool that provides the functions of apt-get and apt-cache in one tool.

The list of available package sources is in /etc/apt/sources.list

Links with more information:

yum for redhat based distributions

yum search something  # search for packet related to something
yum install somepackage # install package

Links with more info: