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

From docwiki
Jump to: navigation, search
Line 10: Line 10:
   
 
<pre>
 
<pre>
apt-get update # reload the list of avialable packages (does no update any packages yet)
+
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"
 
</pre>
 
</pre>
  +
  +
The list of available package sources is in /etc/apt/sources.list

Revision as of 11:29, 22 March 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 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"

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