yum Command in Linux

Learn via video courses
Topics Covered

Transform Your Career

Choose from our industry-leading programs designed for career success

NSDC Certified

Modern Software and AI Engineering Program

Master full-stack development with AI integration

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

Modern Data Science and ML with specialisation in AI

Advanced data science techniques with AI specialization

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

Advanced AIML with Specialisation in Agentic AI

Deep dive into AIML with focus on Agentic systems

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

DevOps, Cloud & AI Platform Engineering

Build and manage AI-powered cloud infrastructure

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

AI Engineering Advanced Certification by IIT-Roorkee

Premier AI engineering certification from IIT-Roorkee

3 MonthsDuration
AI-LedCurriculum
Career SupportSupport
Program highlights
Go to Program

Overview

The yum command in Linux is a powerful utility for package management in RPM (Red Hat Package Manager) based systems. It stands for 'Yellowdog Updater, Modified' and is an interactive, automated update program which can be used for maintaining systems using RPM. With the yum command in Linux, you can install, update, remove or search software packages on a system.

Syntax of yum Command in Linux

The basic syntax of the yum command in Linux is as follows:

Where:

  • options: These are optional and modify the behavior of the yum command.
  • command: This is what you want yum to do, such as install, update, or remove.
  • package: The name of the software package you want to install, update, or remove.
Free Courses by top Scaler instructors
Python Course for Beginners With Certification: Mastering the Essentials
Java Course - Mastering the Fundamentals
DBMS Course - Master the Fundamentals and Advanced Concepts
JavaScript Course With Certification: Unlocking the Power of JavaScript
C++ Course: Learn the Essentials
Python and SQL for Data Science Course
Python Course for Beginners With Certification: Mastering the Essentials
Java Course - Mastering the Fundamentals
DBMS Course - Master the Fundamentals and Advanced Concepts
JavaScript Course With Certification: Unlocking the Power of JavaScript
C++ Course: Learn the Essentials
Python and SQL for Data Science Course

Options in yum Command in Linux

  1. -y: This option will make yum assume 'yes' as answer to all prompts and run non-interactively.

    For example -

    Output:

    The '-y' option allows the update to proceed without user interaction.

  2. list: Displays a list of all packages in the repositories.

    For example -

    Output:

    The 'list' option is used to display all available and installed packages.

  3. search: Searches for a specified package in the repositories.

    For example -

    Output:

    The 'search' command is used to find a specific package in the repository.

Scaler Placement Report and Statistics

₹23L
AVG CTC
SCALER PLACEMENT PROOF

Scaler learners achieved 2.5x salary growth with average post-Scaler CTC reaching ₹23L.

11,000+placements
650+companies
Verified data
Hiring Partners:
GoogleGoogleAmazonAmazonMicrosoftMicrosoftFlipkartFlipkartAdobeAdobe1200+ more

Example Usages

  • Installing a package:

    Output:

    Explanation: The 'install' command is used to install a new package.

  • Updating all packages:

    Output:

    Explanation: The 'update' command is used to update all packages installed on the system.

Tips

  • The 'yum history' command can be used to view the transaction history.

  • Using 'yum check-update' before 'yum update' can help you review what will be updated.

Turn Learning into Career Growth

1200+Hiring Partners
89%Placement Rate
11,000+Placements
147%Avg Salary Increment
2.5XCareer Growth
₹23 LPAAvg Post-Scaler Salary
1200+Hiring Partners
89%Placement Rate
11,000+Placements
147%Avg Salary Increment
2.5XCareer Growth
₹23 LPAAvg Post-Scaler Salary

Advanced Use Cases of yum Command in Linux

  • Removing a package along with its dependencies:

    Output:

    Explanation: The 'autoremove' command is used to remove a package and its unused dependencies.

  • Installing a group of packages:

    Output:

    Explanation: The 'groupinstall' command is used to install a group of related packages.

  • Listing all enabled repositories:

    Output:

    Explanation: The 'repolist' command is used to display all repositories that yum can install software from.

Conclusion

  • The yum command in Linux is a versatile tool for managing packages on RPM-based Linux distributions.

  • It allows you to install, update, and remove packages along with their dependencies.

  • Advanced features include group installation and removal, and managing repositories.