yum: Package manager for Red Hat-based distributions
August 9th, 2024 12:52 PM Mr. Q Categories: Command
Command: yum
A package management tool used on Red Hat-based Linux distributions (like CentOS, Fedora, and RHEL). yum
(Yellowdog Updater, Modified) simplifies the process of installing, updating, and managing software packages.
Sample Command and Output:
Copy001$ yum
Description:
yum
: Launches theyum
command-line interface, allowing users to manage packages on Red Hat-based systems. It provides options for searching, installing, updating, and removing packages.
Additional Commands and Sample Outputs:
yum update
: Update all installed packages to their latest versions. Sample Command and Output:
Copy001 $ sudo yum update
002 Loaded plugins: fastestmirror
003 Loading mirror speeds from cached hostfile
004 * base: mirror.centos.org
005 * extras: mirror.centos.org
006 * updates: mirror.centos.org
007 Resolving Dependencies
008 --> Running transaction check
009 ---> Package vim.x86_64 2:8.1.2269-1.el7_9 will be updated
010 ---> Package vim.x86_64 2:8.1.2269-1.el7_9.1 will be an update
011 ...
Description:
yum update
: Updates all installed packages to their latest available versions, including any necessary dependencies.yum install package_name
: Install a specific package. Sample Command and Output:
Copy001 $ sudo yum install vim
002 Loaded plugins: fastestmirror
003 Loading mirror speeds from cached hostfile
004 * base: mirror.centos.org
005 * extras: mirror.centos.org
006 * updates: mirror.centos.org
007 Resolving Dependencies
008 --> Running transaction check
009 ---> Package vim.x86_64 2:8.1.2269-1.el7_9 will be installed
010 ...
Description:
yum install <package_name>
: Installs the specified package (vim
in this example) along with its dependencies.yum remove package_name
: Remove a specific package. Sample Command and Output:
Copy001 $ sudo yum remove vim
002 Loaded plugins: fastestmirror
003 Loading mirror speeds from cached hostfile
004 * base: mirror.centos.org
005 * extras: mirror.centos.org
006 * updates: mirror.centos.org
007 Resolving Dependencies
008 --> Running transaction check
009 ---> Package vim.x86_64 2:8.1.2269-1.el7_9 will be erased
010 ...
Description:
yum remove <package_name>
: Removes the specified package (vim
in this example) but retains configuration files, if needed.yum search keyword
: Search for packages matching the specified keyword. Sample Command and Output:
Copy001 $ yum search editor
002 Loaded plugins: fastestmirror
003 Loading mirror speeds from cached hostfile
004 * base: mirror.centos.org
005 * extras: mirror.centos.org
006 * updates: mirror.centos.org
007 ===================================================== N/S matched: editor =====================================================
008 vim.x86_64 : Vi IMproved - enhanced vi editor
009 nano.x86_64 : small, friendly text editor inspired by Pico
Description:
yum search <keyword>
: Searches for packages related to the specified keyword (editor
in this example) in their name or description.yum info package_name
: Display detailed information about a specific package. Sample Command and Output:
Copy001 $ yum info vim
002 Loaded plugins: fastestmirror
003 Loading mirror speeds from cached hostfile
004 * base: mirror.centos.org
005 * extras: mirror.centos.org
006 * updates: mirror.centos.org
007 Installed Packages
008 Name : vim
009 Arch : x86_64
010 Version : 8.1.2269
011 Release : 1.el7_9
012 Size : 1.2 M
013 Repo : installed
014 From repo : updates
015 Summary : Vi IMproved - enhanced vi editor
Description:
yum info <package_name>
: Displays detailed information about the specified package (vim
in this example), including its version, size, and repository.
Note: yum
is used for managing software on Red Hat-based distributions, offering powerful features for package management and system updates.