What is yum and use cases of yum?

What is yum?

What is yum

yum, short for Yellowdog Updater Modified, is a command-line package management utility for RPM (Red Hat Package Manager)-based Linux distributions, such as CentOS and Fedora. It is used to install, update, remove, and manage software packages and dependencies.

Top 10 use cases of yum?

Let’s explore 10 common use cases for yum (Yellowdog Updater Modified), a package management tool primarily used in Red Hat Enterprise Linux (RHEL) and its derivatives:

  1. Package Installation:
    • yum allows you to easily install software packages and their dependencies. For example:$ yum install package_name
  2. Package Removal:
    • To remove a package and its dependencies:$ yum remove package_name
  3. Package Update:
    • Keep your system up-to-date by updating packages:$ yum update package_name
  4. Search for Packages:
    • Find available packages in repositories:$ yum search package_name
  5. List Installed Packages:
    • Get a list of all installed packages:$ yum list installed
  6. Repository Management:
    • Enable, disable, or manage repositories:$ yum repolist
  7. Dependency Resolution:
    • yum automatically resolves package dependencies during installation or removal.
  8. Group Installations:
    • Install packages as part of a group (e.g., development tools):$ yum groupinstall group_name
  9. Query Package Information:
    • Retrieve details about a package:$ yum info package_name
  10. System Updates:
    • Update the entire system:$ yum update

Remember that while yum is still available, dnf is the recommended package manager for newer RHEL-based distributions. Explore the world of package management and enjoy maintaining your Linux system! 📦🐧

What are the feature of yum?

Let’s explore the features of yum (Yellowdog Updater Modified), a package management tool commonly used in Red Hat Enterprise Linux (RHEL) and its derivatives:

  1. Package Management:
    • yum is the primary tool for getting, installing, deleting, querying, and managing RPM software packages from official Red Hat repositories and third-party repositories1.
  2. Automatic Dependency Resolution:
    • When you install or update a package, yum automatically resolves and installs any required dependencies.
  3. Multiple Repositories:
    • yum works with software repositories, which can be approached locally or over a network connection. It allows you to manage packages from various sources.
  4. Easy-to-Use Command Line:
    • The command-line interface of yum is intuitive and straightforward, making it accessible for system administrators and users.
  5. Repository Management:
    • You can enable, disable, or manage repositories using yum commands.
  6. Group Installations:
    • Install packages as part of a group (e.g., development tools) using yum groupinstall.
  7. Query Package Information:
    • Retrieve details about a package using yum info package_name.
  8. System Updates:
    • Keep your entire system up-to-date by running yum update.

Remember that while yum is still available, dnf (the next-generation package manager) is recommended for newer RHEL-based distributions. Enjoy managing your packages with yum! 📦🐧

How yum works and Architecture?

yum works and Architecture

Yum (Yellowdog Updater Modified) is a powerful package management tool primarily used in Red Hat Enterprise Linux (RHEL) and its derivatives. Let’s discover how it works and its architecture:

  1. Package Management:
    • Yum allows you to query information about available packages, fetch packages from repositories, install and uninstall them, and update the entire system to the latest available version.
    • It performs automatic dependency resolution when updating, installing, or removing packages. This means it can determine, fetch, and install all dependent packages automatically.
    • Yum can be configured with new repositories or package sources, and it provides various plug-ins to enhance its capabilities.
  2. Repositories:
    • Repositories are organized collections of packages that yum uses.
    • When you request a package installation or update, yum checks these repositories to fetch the correct and exact version of the package compatible with your system.
  3. GPG Signature Verification:
    • Yum provides secure package management by enabling GPG (Gnu Privacy Guard) signature verification.
    • When signature verification is enabled, yum ensures that packages are GPG-signed with the correct key for the repository. This ensures trust and prevents installation of modified packages.
  4. Parallel Downloading:
    • Whenever possible, yum uses parallel download of multiple packages and metadata. This speeds up the downloading process.
  5. Superuser Privileges:
    • To use yum for installing, updating, or removing packages, you must have superuser privileges (usually obtained using su or sudo commands).
  6. Learning Investment:
    • Learning yum is worthwhile because it’s often the fastest method to perform system administration tasks.
    • It provides capabilities beyond those offered by graphical package management tools like PackageKit.

Remember, yum is still available, but dnf (the next-generation package manager) is recommended for newer RHEL-based distributions. Explore package management and enjoy maintaining your Linux system! 📦🐧

How to Install yum it?

Yum, which stands for Yellowdog Updater Modified, is a package manager primarily used in Red Hat Enterprise Linux (RHEL) and its derivatives. However, it has been largely replaced by dnf, a faster and more efficient package manager. Modern Linux distributions often use yum as a compatibility layer for dnf to accommodate legacy Bash scripts and old commands.

Here are the steps to install yum or dnf on various Linux distributions:

  1. RHEL, Fedora, CentOS, AlmaLinux, Rocky Linux (Modern Versions):
    • On recent versions of RHEL-based distributions like Fedora, CentOS, AlmaLinux, and Rocky Linux, dnf is already installed by default. You can still use the yum command, which is a symbolic link to the dnf executable:
         $ ls -l /usr/bin/yum lrwxrwxrwx. 1 root root 5 Sep 9 09:05 /usr/bin/yum -> dnf-3                       

2. Ubuntu 18.04, Debian 10, and Older Versions:

  • For slightly older versions of Debian and Ubuntu, you can still install and use yum, although it’s recommended to opt for dnf instead. To install yum:
        $ sudo apt update 
        $ sudo apt install yum            
  • Alternatively, you can install dnf:
         $ sudo apt install dnf               

Remember that yum is outdated (with the latest release from 2011) and has been superseded by dnf. In most cases, it’s better to install dnf or stick with your distribution’s default package manager. On older systems, yum can still be used, but it mainly serves as a compatibility layer that hands off instructions to dnf.

Basic Tutorials of yum: Getting Started

Basic Tutorials of yum

Yum (Yellowdog Updater Modified) is a package manager for Red Hat-based Linux distributions like Fedora, CentOS, and RHEL. Here are some step-by-step tutorials to get you started with yum basics:

1. Checking Installed Packages:

  • List all installed packages:
    • Run yum list in your terminal.
    • This will display a list of all installed packages with their versions and repositories.
  • Search for a specific package:
    • Run yum search <package_name> to find packages matching the name.
    • You can use wildcards like * for broader searches.

2. Installing Packages:

  • Install a single package:
    • Run yum install <package_name> to install the package.
    • You can install multiple packages by apart them with spaces.
    • Yum will automatically download and install any dependent packages needed.
  • Install with specific version:
    • Run yum install <package_name>-<version> to install a specific version of the package.

3. Updating Packages:

  • Update all packages:
    • Run yum update to update all installed packages to their latest versions.
  • Update a specific package:
    • Run yum update <package_name> to update only that package.
  • Upgrade to a new version:
    • Run yum upgrade to upgrade all packages to their latest major versions (may break compatibility).

4. Removing Packages:

  • Remove a package:
    • Run yum remove <package_name> to remove the package.
  • Remove with dependencies:
    • Run yum remove -y <package_name> to remove the package and its dependent packages.

5. Managing Repositories:

  • List enabled repositories:
    • Run yum repolist to see a list of enabled repositories.
  • Enable a repository:
    • Run yum-config-manager --enable <repository_name> to enable a repository.
  • Disable a repository:
    • Run yum-config-manager --disable <repository_name> to disable a repository.

Tips:

  • Use -h after any command for help and usage information.
  • Always update your system regularly for security and stability.

These are just some basic tutorials to get you started with yum. Remember, there are many more features and options available.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x