YUM Package Manager
Yellowdog Updater Modified (yum) is a much easier package manager which works on rpm RPM-based system. The two attractive features of 'yum' when compared with 'rpm' is it resolves dependency automatically. It also can automatically perform the system update.
1. Overview
YUM is also known as the Red Hat package manager.
It provides the following functionalities:
Fetching information about available packages.
Installing and uninstalling packages.
Updating individual packages or the entire system to the latest versions.
Automatically resolving dependencies during package installation, removal, or updates.
2. Key Features
Dependency Resolution: YUM ensures that all required dependencies are met when installing or updating packages.
Repositories: YUM can be configured with additional repositories (sources of packages) beyond the default ones.
Plug-ins: YUM supports various plug-ins to enhance its capabilities.
Fast and Efficient: YUM performs tasks quickly, making it ideal for system administrators.
3. Common YUM Commands
Let's explore some common YUM commands:
a. Checking for Updates
You can verify available updates for installed packages using the following command:
This command lists package names, their versions, CPU architecture, and the repository where each package is available.
b. Installing and Updating Packages
To install a package:
To update a package:
c. Working with Transaction History
Listing recent transactions:
Examining a specific transaction:
Reverting a transaction:
d. Configuring YUM and Repositories
Edit the main YUM configuration file:
Add or enable repositories:
e. yum search <package-name>
yum search <package-name>Searches for packages matching the specified name or keywords.
Example:
f. yum provides <file>
yum provides <file>Determines which package provides a specific file.
Example:
g. yum repolist
yum repolistLists enabled repositories along with their status.
Example:
h. yum clean all
yum clean allCleans temporary files and cached data.
Removes metadata and improves system performance.
Example:
4. Lab Exercise
Let's create a simple lab exercise to practice using YUM:
Objective: Install the
htoppackage.Steps:
Check if
htopis already installed:If not installed, install it:
Verify the installation:
Last updated