Keeping your Linux system up-to-date is a very critical task, especially when it comes to installing security updates. This ensures that your system stays safe, stable, and keeps you on top of the latest security threats.

In this short and precise article, we will explain how to install security system updates on a CentOS 8 Linux system. We will show how to check for system updates (for all installed packages), updates for a specific package, or security updates only. We will also look at how to install updates either for a specific package, for all installed packages, or security updates only.

First, log into your system and open a terminal window, or if it is a remote system, access it via ssh. And before you move any further, take note of your the current kernel version on your system:

# uname -r

Check Current Kernel Version

Check Current Kernel Version

Checking Security Updates for CentOS 8 Server

To check if there are any updates available, issue the following command on the command prompt. This command non-interactively checks whether there are any updates are available for all packages on your system.

# dnf check-update

Check CentOS 8 Updates

Check CentOS 8 Updates

If you want, you can check updates for a specific package, provide the package name as shown.

# dnf check-update cockpit

Check Updates for Package

Check Updates for Package

Checking Security Updates for Installed Software Packages

You can determine if there are security-related updates or notices available, using the following command. It will show a summary of security notices displaying the number of updates in each category. From the screenshot below, there is 1 security update available for us to install on the test system.

# dnf updateinfo

Check Notices for Security Updates

Check Notices for Security Updates

To show the actual number of security packages with updates for the system, run the command that follows. Although there is only 1 security update as indicated in the output of the previous command, the actual number of security packages is 3 because the packages are related to each other:

# dnf updateinfo list sec
OR
# dnf updateinfo list sec | awk '{print $3}'

List Number of Security Updates

#centos #security #centos tips #centos-8

How to Install Security Updates on CentOS 8
5.75 GEEK