Introduction -:
Welcome guys, Here we are learning the installation of the one of the most useful utility in linux, called as “YUM (Yellowdog Updater, Modified). Also you may learn the basic things about the linux into our blog “TechStudy24By7“.
Here are some key points about YUM and how it works:
- Package Management: YUM is used to manage software packages on a Linux system. A package is a collection of software files, configurations, and metadata needed to install and run a specific application or library.
- Repository: YUM uses software repositories to store and organize packages. A repository is a centralized location where packages and their associated metadata are made available for installation and updates. YUM can be configured to use multiple repositories, which provide access to a wide range of software packages.
- Dependency Resolution: One of YUM’s main strengths is its ability to handle package dependencies automatically. When you request the installation of a package, YUM will also identify and install any other packages required by the requested package to ensure it functions correctly.
- Commands: YUM can be accessed through the command-line interface (CLI) in the terminal. Some commonly used YUM commands include:
yum install package_name
: Installs a package.yum update package_name
: Updates a package to the latest available version.yum remove package_name
: Uninstalls a package from the system.yum search keyword
: Searches for packages based on a keyword.yum list
: Lists all installed packages.yum info package_name
: Displays detailed information about a package.
- Repositories Configuration: YUM’s main configuration file is located at
/etc/yum.conf
. Repository configurations are stored in separate.repo
files in the/etc/yum.repos.d/
directory. Each.repo
file defines a repository, including its name, base URL, enabled status, and other options. - Package Caching: YUM caches the downloaded packages in the system to reduce the download time and bandwidth usage for future installations or updates.
- Security and GPG Key: YUM uses GPG (GNU Privacy Guard) signatures to verify the integrity and authenticity of the packages downloaded from repositories, ensuring that the packages have not been tampered with.
- Graphical Frontends: In addition to the command-line interface, YUM also has graphical frontends like
dnfdragora
andyumex
, which provide a more user-friendly and visual way to manage packages.
In Linux, “yum” is a package manager used primarily in Red Hat-based distributions, such as CentOS and Fedora. However, it is being gradually replaced by “dnf” (Dandified Yum) in newer versions of these distributions. If you are using an older version that still uses yum, you can install it by following these steps:
Check if yum is already installed -:
To check if yum is already installed on your system, open a terminal and run the following command:
$ yum --version
If yum is already installed, you’ll see its version information. Otherwise, you will receive an error message indicating that the command is not found.
Install yum -:
If yum is not installed on your system, you can install it using the package manager specific to your distribution.
For CentOS 7 and earlier, use the following command:
$ sudo yum install yum
For Fedora and CentOS 8, “dnf” is the default package manager, but you can still install yum using dnf:
$ sudo dnf install yum
Follow the prompts to confirm the installation, and the package manager will download and install yum on your system.
Verify the installation –:
After the installation is complete, you can check the version of yum to ensure it’s installed correctly:
$ yum --version
You should now see the version information for yum.
As mentioned earlier, if you are using the latest versions of CentOS or Fedora, “dnf” is the recommended package manager. Yum has been largely replaced by dnf, which offers better performance and additional features. For example, on CentOS 8, you can directly use “dnf” without installing yum.
Difference -: YUM & DNF
Feature | YUM (Yellowdog Updater, Modified) | DNF (Dandified YUM) |
Package Manager Type | Legacy package manager used in older RHEL versions | Modern package manager used in newer RHEL versions |
Performance | Slower compared to DNF | Faster and more efficient |
Dependency Resolution | Basic dependency resolver | Advanced dependency resolver |
Backend and Libraries | Uses now deprecated YUM libraries | Uses hawkey library for dependency resolution |
Command Syntax | Familiar YUM commands | Maintains backward compatibility with YUM commands |
Output and User Experience | Plain text output | Colorized text and progress bars |
Plugin Architecture | Limited extensibility | More extensible with a robust plugin architecture |
Package Downgrade Support | Does not support package downgrades | Supports package downgrades |
Package Management API | Limited API | Well-defined and documented API |
Package Caching | Yes | Yes |
Security and GPG Key | Uses GPG signatures for package verification | Uses GPG signatures for package verification |
Default in Modern Distributions | No, replaced by DNF in newer Fedora and RHEL versions | Yes, default package manager |
Package Group Support | Basic support for package groups | Enhanced support for package groups |
If you are using other Linux distributions, such as Debian/Ubuntu (which use APT as their package manager) or Arch Linux (which uses Pacman), yum will not be available, and you should use the appropriate package manager for your distribution.