Linux yum tutorial: the role of --disablerepo and --enablerepo

yum --disablerepo="*" --enablerepo="elrepo-kernel" list available

explain the above command

This code is used to list available packages using the Yum package manager on a Red Hat or CentOS-based Linux system, and in the process disable all configured software repositories (repositories), and then enable the package named "elrepo -kernel" repositories.

Let's explain step by step what each option means:

  • yum: is a package manager on Red Hat and CentOS systems, used to install, update and remove software packages.

  • --disablerepo="*": This option instructs Yum to disable all configured repositories. The wildcard "*" means to disable all repositories, so that Yum will not use any configured repositories when executing the command.

  • --enablerepo="elrepo-kernel": This option instructs Yum to enable the repository named "elrepo-kernel". "elrepo-kernel" is a third-party repository that provides additional kernel packages. By enabling this repository, Yum will fetch the list of available packages from this repository.

  • list available: This command tells Yum to list available packages. Yum will check the enabled repositories and display the list of available packages on the terminal.

To sum up, what this command does is to use the Yum package manager to enable the "elrepo-kernel" repository with all configured repositories disabled, and list the packages available in that repository. This is useful for viewing kernel packages available in the "elrepo-kernel" repository.

Guess you like

Origin blog.csdn.net/a772304419/article/details/132278975