Enhancing Skills

yum: Package manager for Red Hat-based distributions

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:

$ yum

Description:

  • yum: Launches the yum 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:
  $ sudo yum update
  Loaded plugins: fastestmirror
  Loading mirror speeds from cached hostfile
   * base: mirror.centos.org
   * extras: mirror.centos.org
   * updates: mirror.centos.org
  Resolving Dependencies
  --> Running transaction check
  ---> Package vim.x86_64 2:8.1.2269-1.el7_9 will be updated
  ---> Package vim.x86_64 2:8.1.2269-1.el7_9.1 will be an update
  ...

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:
  $ sudo yum install vim
  Loaded plugins: fastestmirror
  Loading mirror speeds from cached hostfile
   * base: mirror.centos.org
   * extras: mirror.centos.org
   * updates: mirror.centos.org
  Resolving Dependencies
  --> Running transaction check
  ---> Package vim.x86_64 2:8.1.2269-1.el7_9 will be installed
  ...

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:
  $ sudo yum remove vim
  Loaded plugins: fastestmirror
  Loading mirror speeds from cached hostfile
   * base: mirror.centos.org
   * extras: mirror.centos.org
   * updates: mirror.centos.org
  Resolving Dependencies
  --> Running transaction check
  ---> Package vim.x86_64 2:8.1.2269-1.el7_9 will be erased
  ...

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:
  $ yum search editor
  Loaded plugins: fastestmirror
  Loading mirror speeds from cached hostfile
   * base: mirror.centos.org
   * extras: mirror.centos.org
   * updates: mirror.centos.org
  ===================================================== N/S matched: editor =====================================================
  vim.x86_64 : Vi IMproved - enhanced vi editor
  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:
  $ yum info vim
  Loaded plugins: fastestmirror
  Loading mirror speeds from cached hostfile
   * base: mirror.centos.org
   * extras: mirror.centos.org
   * updates: mirror.centos.org
  Installed Packages
  Name        : vim
  Arch        : x86_64
  Version     : 8.1.2269
  Release     : 1.el7_9
  Size        : 1.2 M
  Repo        : installed
  From repo   : updates
  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.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.