The yum Command
The yum command is an automated system for updating rpm-based packages, particularly on Fedora and Red Hat Enterprise Linux. Yum can automatically install, upgrade, and remove packages. In addition to individual packages or a list of packages, yum can operate on an entire group of packages at a time.
When you run yum, it first updates the cache (unless you tell it not to with the -C option); then it proceeds to perform the requested operation.
The format of the yum command is:
yum [options
] [command
] [package
...]
Any general options are specified first, followed by a command telling yum what you want it to do, usually followed by a list of one or more packages. The command is always required, except with the --help, -h, and --version options.
Package names can be specified in various combinations of name, architecture, version, and release. For example, you could refer to the bash package as bash, bash.x86_64, bash-3.2, bash-3.2-30, or bash-3.2-30.fc10.x86_64.
General options
The following general options can be set on the command line. For those that can also be set in the [main] section of the yum.conf configuration file, the name of the configuration option is given.
- -c [onfig-file]
Specify the location of the yum configuration file. The file can be specified as a path to a local file or as an HTTP or FTP URL. The default is /etc/yum.conf.
- -C
Run entirely from the local cache. Don’t download or update headers unless required to complete the requested action.
- -d [num]
Set ...
Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.