CentOS/RHEL v5/6 Update Command

last updated in Categories , ,

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

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.


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

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.


Leave a Comment