← 返回命令列表

Linux command

yum 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Install

sudo yum install [package]

Remove

sudo yum remove [package]

Update

sudo yum update

Update

sudo yum update [package]

Search

yum search [keyword]

List installed

yum list installed

Show info

yum info [package]

Clean

yum clean all

说明

yum (Yellowdog Updater Modified) is the traditional package manager for Red Hat-based Linux distributions. On modern systems (RHEL 8+, Fedora 22+), yum is a symlink to dnf, which provides the same functionality with improved performance. On older systems like CentOS 7, yum is the native package manager handling package installation, updates, and removal from configured repositories.

参数

install _package_
Install one or more packages.
remove _package_
Remove a package.
update _package_
Update all packages, or a specific package if given.
search _keyword_
Search package names and descriptions.
info _package_
Display detailed information about a package.
list _installed_|_available_|_updates_
List packages. Use installed for installed, available for repo packages, updates for available updates.
clean _all_|_packages_|_metadata_
Clean cached data.
provides _file_
Find which package provides a given file.
groupinstall _group_
Install a package group.
repolist _all_|_enabled_|_disabled_
List configured repositories.
history
View transaction history.
-y
Assume yes to all prompts.
--enablerepo=_repo_
Temporarily enable a specific repository.
--disablerepo=_repo_
Temporarily disable a specific repository.
--nogpgcheck
Skip GPG signature checking.

FAQ

What is the yum command used for?

yum (Yellowdog Updater Modified) is the traditional package manager for Red Hat-based Linux distributions. On modern systems (RHEL 8+, Fedora 22+), yum is a symlink to dnf, which provides the same functionality with improved performance. On older systems like CentOS 7, yum is the native package manager handling package installation, updates, and removal from configured repositories.

How do I run a basic yum example?

Run `sudo yum install [package]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does install _package_ do in yum?

Install one or more packages.