Skip to main content

Command referenceyum

yum command (Linux / bash / sh / zsh)

Linuxbashshzshpackagebeginner

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 / optionMeaning
install PACKAGEInstall a package and dependencies.
remove PACKAGEUninstall a package.
updateUpdate installed packages.
search TERMSearch package metadata.
info PACKAGEShow 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.

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.