yum

>Usage

The yum (Yellowdog Updater, Modified) command is a package manager used in CentOS, Red Hat Enterprise Linux (RHEL), and other RPM-based Linux distributions. It simplifies the process of managing software packages by automating tasks such as installation, updating, and removal of packages, while also handling dependencies.

The yum command has been mostly replaced by dnf in newer versions of CentOS and RHEL, but it still remains widely used in legacy systems.

>Synopsis

yum [option] [command]

>Commands

install

Installs a specified package.

Dots

-c

> yum install vsftpd


(Installs the vsftpd package)

update

Updates all installed packages to their latest available versions.

remove

Uninstalls a specified package.

search

Searches for packages related to a specific name.

list

Lists package names from repositories. To this command, the user can add avalible (to list avalible packages) or installed (to list installed packages).

>Options

-c

Uses a specified configuration file instead of the default /etc/yum.conf.

Example:

Dots

-c

> yum -c /path/to/custom-yum.conf list installed


Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Installed Packages
httpd.x86_64 2.4.6-93.el7.centos @base
vim-enhanced.x86_64 7.4.160-7.el7 @base

-y

Automatically answers “yes” to any prompts during execution. Useful for unattended operations.

Example:

Dots

-y

> yum -y install nano


Loaded plugins: fastestmirror Resolving Dependencies --> Running transaction check ---> Package nano.x86_64 0:2.3.1-10.el7 will be installed --> Finished Dependency Resolution Installed: nano.x86_64 0:2.3.1-10.el7 Complete!

--disablerepo

Temporarily disables a specific repository during the execution of the command. A repository is generally a webserver (or many more) holding software to download.

Example:

Dots

--disablerepo

> yum --disablerepo=extras update


Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Resolving Dependencies --> Running transaction check No packages marked for update

>Quiz

Progress: Question ? out of ?

Question Title

Page written by Cyrus Kamau Nganga