How to Install Security Updates on CentOS 8

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
# dnf updateinfo list sec | awk '{print $3}'
List Number of Security Updates
List Number of Security Updates

Updating a Single Package on CentOS 8

After checking for updates, if there is any available updates, you can install it. To install updates for a single package, issue the following command (replace the cockpit with the package name):

# dnf check-update cockpit
Update a Single Package
Update a Single Package

In the same manner, you can also update a group of packages. For example, to update your development tools, run the following command.

# dnf group update “Development Tools”

Updating CentOS 8 System Packages

Now to update all of your installed packages to the latest versions, run the following command. Note that this may not be ideal in a production environment, sometimes updates may break your system – note of the next section:

# dnf update 
Install Updates for CentOS 8
Install Updates for CentOS 8

Installing Security Updates Only on CentOS 8

As mentioned above, running a system-wide update of packages may not be ideal in a production environment. So, you can only install security updates to secure your system, as shown.

# dnf update --security
Install Security Updates on CentOS 8
Install Security Updates on CentOS 8

You can also install security updates automatically using our following guide.

That’s all for now! Always know how to protect yourself from known vulnerabilities. And it all starts with keeping your Linux system up-to-date. If you have any questions or comments to share, reach us via the comment section below.

If you read this far, tweet to the author to show them you care. Tweet a thanks
Aaron Kili
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

107 thoughts on “How to Install Security Updates on CentOS 8”

  1. Hello,

    I am completely new to Linux and CentOS. Could you explain why my USB keyboard gets disabled at step 2? I cannot complete the CentOS installation because of that.

    Thank you for your help.

  2. hello Ravi,
    i’m having trouble installing CEntOS 6.3. i have just enrolled for the course of LINUX , and as our instructor guided, we didn’t have to go for configuring network and at ‘step 13’ we chose ‘Create Custom Layout’, then after clicking on ‘Next’ tab the window appears with following data

    sda1 (ntfs) 100MB
    sda2 (ntfs) 102410MB
    sda3 (ntfs) 204809MB
    sda4 (ntfs) 100616MB
    Free 69002MB

    I select ‘Free’ in this step , then click ‘Create’ tab.

    A window named ‘Standard Partition’ appears and then again click on ‘Create’ tab

    Then the ‘Add Partition’ window arrives, there I select as below for the first selection:

    Mount Type : /
    File System Type : ext4
    Allowable Drives : (The name of my HDD with its size showing as sda with check marked but disabled)
    Size(MB) : 40000

    after this when i click OK the error msg appears saying ‘Could not allocate requested partitions: not enough free space on disks’. why this error msg appears ? when we tried to install in our classroom pc there was no such trouble.

    my default OS is Windows 7 Professional 64-bit


    (C) Healthy (Primary ….) 65.06GB free of Capacity 100.01GB

    (D) Healthy (Primary ) 25.17GB free of Capacity 200.01GB

    (E) Healthy (Primary ) 34.11GB free of Capacity 98.26GB

    (System Reserved) Healthy (Primary ) 33MB free of Capacity 100MB

    Unallocated __________________________________________________________ 67.38GB

    do i have to increase the unallocated space ? 67.38GB is not enough for CEntOS 6.3 ?

    • @yasmeen,
      Please follow below instructions. First create /boot partition with size 300MB and then create swap partition as partition type Swap and then create / Partition and allocate all will work..

  3. Hi sir,
    I am completely new to all these concepts… please tell me where to place thse iso files after downloading them so that while booting system detects it?? and aslo how to identify the vacant drives from the names hda hdb and so on??

  4. Hi Ravi,

    Very nice presentation. I am looking similar presentation or documents for configuring Centos desktop with Centos server with Domain, Active directory config, DNS server. I want to use the server for user authentication purpose.

    Thanks and Regards,


  5. I have installed CentOS 6.2. But at the time of Package selection, only default are checked. But now i want to select other packages too.

    How to do the same. I have CentOS installation CD

    • Please insert the CentOS installation CD and install software packages from Software Selection application, you will find under Application menu somewhere.

  6. Hi

    i am using windows 8 with VMware 6 and installed centos 6.4 with 768 MB memory.

    i am very new to Linux…but successfully installed CentOS.
    I have following doubts please clarify
    1) when i boot my centOS i am just getting Command line with Username and password. i can log in no problem with that. How can i get a GUI display???
    2) now on this CentOS i want to install asterisk 3.0 How can i acheive that ?? i have Asterisk setup already downloaded in ISO image…Please guide



    • For your first point, run the following command to get GUI.

      # init 5

      For second point, search asterisk article using our search form at the top right corner.

  7. hi guys,
    i am very much interested to learn the linux, so currently i’m using Centos flavour in linux while practising the Centos i’m getting lot of doubts in my dialy practical scenario, so here my doubt is that when i’m creating partitions automatically it’s taking 4 partitions . so could anyone please explain why its taking 4 partitions when i’m creating only one ???


Got something to say? Join the discussion.

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.