CentOS/RHEL v5/6 Update Command

How do I apply package updates from the RHN or CentOS repo on CentOS / RHEL / Fedora / Red Hat Enterprise Linux?

Tutorial details
Difficulty Easy (rss)
Root privileges Yes
Requirements yum
Time 1m
You need to use yum command. yum is an interactive, rpm based, package manager. It can automatically perform system updates, including dependency analysis and obsolete processing based on “repository” metadata. It can also perform installation of new packages, removal of old packages and perform queries on the installed and/or available packages among many other commands.

ADVERTISEMENTS

List updates

The check-update option tells you if your machine had any updates that needed to be applied without running it interactively:
# yum check-update

Apply update to the operating system

Use the following command to update the operating system:
# yum update

Update a specific package

To update a specific package, such as httpd, use the following command:
# yum update httpd

To find more information about the command line options available for yum command, use the following command:
# man yum

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
0 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.