Linux package management tool - yum

Table of contents

foreword

1. Install the software package

2. Update the software package

3. Upgrade the software package

4. Search software packages

5. Remove the package

6. Clear the cache

7. View installed packages


foreword

Yum is a package manager used in RedHat, CentOS, etc. to install and update and manage software packages. However, it should be noted that Red Hat has begun to transfer its package management to dnf. Dnf is an enhanced version of yum and is very similar to yum in use. To a certain extent, yum and dnf have different names, but the commands are basically Are the same.

1. Install the software package

Use the following command to install a package, for example the package named "example_package":

sudo yum install example_package

2. Update the software package

Use the following command to update installed packages:

sudo yum update

3. Upgrade the software package

If you want to upgrade all packages in the system, you can run the following command:

sudo yum upgrade

4. Search software packages

A specific package can be searched for, for example, a package named "example_package" with the following command:

yum search example_package

5. Remove the package

To remove packages that are no longer needed, you can run the following command:

sudo yum remove example_package

6. Clear the cache

yum saves the cache when installing, updating or removing packages. To clean up the old package cache, you can run the following command:

sudo yum clean all

7. View installed packages

To see a list of installed packages, you can run the following command:

yum list installed

 

Guess you like

Origin blog.csdn.net/m0_67906358/article/details/131937338
Recommended