What is yum and how do I use it?


  • What is yum and how do I use it?


  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6


1.What is yum?

Yum or Yellow dog Update, Modified is a package manager that was developed by Duke University to improve the installation of RPMs.

Yum searches numerous repositories for packages and their dependencies so they may be installed together in an effort to alleviate dependency issues. Red Hat Enterprise Linux 5 uses Yum to fetch packages and install RPMs.

Yum uses a configuration file at /etc/yum.conf. Also refer yum(8) man page for more information.

There are multiple ways by which you can install a repository on the system and install/update packages :

  • Add an existing repository
  • Setup a new repository having packages populated from ISO’s downloaded from RHN
  • Register the system on RHN and subscribe to the channels depending on the subscription you have.

If you wish to add a new yum repository to the system refer – How can I add a new yum repository as a source to install software?

If you wish to install a repository and fetch updates from DVD ISO you can refer – How do I setup a yum or up2date repository to use a locally mounted DVD with Red Hat Enterprise Linux 4 and 5?

If you want to register your system on RHN you can refer-How do I access Red Hat Network (RHN) to download software, updates, and security errata?

To access the repositories from  Red Hat Network (RHN)  to which you are entitled to – you need to register the system on RHN and subscribe to the required channels. Please consult the RHN FAQ list, for more information about registering with RHN, subscribing systems and other common questions around RHN.

2.How do I use it?
Yum must be running as root
Here are some useful commands.

1) Install a package:

yum install package


yum install httpd

2) Remove a package:

yum remove package


yum remove httpd

3) Update a package:

yum update package


yum update httpd

4) Search for a package:

yum search package


yum search httpd

5) Find information about a package:

yum info package


yum info httpd

6) List packages containing a certain term:

yum list term


yum list httpd

7) Find what package provides a particular file:

yum whatprovides 'path/filename'


yum whatprovides 'etc/httpd.conf'
yum whatprovides '*/libXp.so.6'

8) Update all installed packages with kernel package :

yum -y update


yum -y update

9) To update a specific package:

yum -y update <package-name>


yum -y update openssh-server

Copy from https://access.redhat.com/knowledge/solutions/9934
By dbglory Posted in Linux

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s