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

From docwiki
Jump to: navigation, search
(Motivation)
Line 8: Line 8:
   
 
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.
 
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 ==
   
 
<pre>
 
<pre>
Line 17: Line 19:
   
 
The list of available package sources is in /etc/apt/sources.list
 
The list of available package sources is in /etc/apt/sources.list
  +
  +
  +
== yum for redhat based distributions ==
  +
  +
<pre>
  +
yum search something # search for packet related to something
  +
yum install somepackage # install package
  +
</pre>
  +
  +
Links with more info:
  +
  +
* https://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/
  +
* https://access.redhat.com/articles/yum-cheat-sheet

Revision as of 11:36, 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 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"

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


yum for redhat based distributions

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

Links with more info: