yum command (Linux / bash / sh / zsh)
What it does
Manage RPM packages and repositories on compatible Linux distributions. When people search for the yum command linux packages, they usually want yum's everyday flags, safe examples, and how it differs from related tools. Below you'll find syntax, options, and copyable examples for Bash/sh/zsh.
Manage RPM packages and repositories on compatible Linux distributions.
Syntax
yum [OPTION] COMMAND [PACKAGE...]
Common options
| Flag / option | Meaning |
|---|---|
| install PACKAGE | Install a package and dependencies. |
| remove PACKAGE | Uninstall a package. |
| update | Update installed packages. |
| search TERM | Search package metadata. |
| info PACKAGE | Show package information. |
Practical examples
Install package
sudo yum install nginx
Installs nginx from configured repositories.
Check updates
yum check-update
Reports available package updates.
Package details
yum info curl
Displays metadata about curl.
Linux ↔ Windows equivalent
Closest match: apt (Linux / bash / sh / zsh). Search, install, update, and remove packages on Debian-based systems.
apt is the common Debian-family counterpart; modern RPM systems may implement yum through DNF.
Common mistakes
- Using yum instructions on a Debian-based distribution.
- Performing a broad production update without reviewing package and service impact.
Related commands
- aptSearch, install, update, and remove packages on Debian-based systems.
- sudoRun an authorized command with another user's privileges.
- systemctlControl and inspect services and other systemd units.
- conda createCreate a new isolated Conda environment with an optional Python version and starter packages.
- conda activateActivate a named or path-based Conda environment in the current shell session.
- conda installInstall packages into the active or named Conda environment from configured channels.
- conda listList packages installed in the active or named Conda environment.
- conda env listList all Conda environments and mark the currently active one.
FAQ
What does yum do in Linux?
Manage RPM packages and repositories on compatible Linux distributions.
How do I use yum from the terminal?
Start with `yum [OPTION] COMMAND [PACKAGE...]`, then choose only the options needed for the task.
What is a practical yum example?
Try `sudo yum install nginx` — Installs nginx from configured repositories.
Can I use yum in a shell script?
Yes. yum works in Bash, sh, and Zsh, but scripts should handle quoting, errors, and command output explicitly.
Browse the full Linux and Windows command reference to search more bash, CMD, PowerShell, Conda, and GitHub CLI commands.