How to upgrade the kernel to CentOS 8.0

s2 0

The kernel is the most important central core of an operating system. Most Linux distributions like Ubuntu, Debian or CentOS 8 install a stable kernel version, but not the latest. And the kernel will not be upgraded to a major new version unless you upgrade the entire operating system. The Linux distributions maintain security patches for their kernel version that make the operating system more secure. Some users use Linux for their PC systems on which they have current hardware. To do this, it is more practical to use a newer kernel that can easily detect the latest devices. In this way, the user can also improve the performance of devices that are already installed on the user’s system. So this guide shows you how to update the kernel in the CentOS 8 environment.

Update the kernel to CentOS 8

To update the system’s kernel, you need to do the following:

  1. Open the Terminal to click on the Activities option that appears in the left corner of the desktop.
  2. The next step is to log in as the root user to update the kernel and install the required repositories on your system. Run the ‘su’ command on the terminal. You are now logged in as the root user.

Note: Before you begin upgrading the kernel, be aware that you do not need to upgrade the kernel if your system is working fine. Also, if you are using CentOS on the home or production server, upgrading the kernel is not recommended unless you are trying it for testing purposes.

You need to add the GPG key for the repository to make the installation secure. Enter the following command at the terminal:

$rpm --import

Now add an external repository called ‘elrepo’ to your system. To do this, you need to install the following RPM package on CentOS 8.0:

$dnf install

During the installation process, the installation task is interrupted by a user confirmation prompt asking the user whether or not you want to complete the installation process. You press the ‘y’ key on the keyboard to continue.

An external repository ‘elrepo’ has been successfully added to your system.

You can check the list of repositories and packages on the terminal. To see the list of packages with full status, you need to run the following command: Check the repository list with DNF

Now install the new kernel on your CentOS 8.0. But before you start the installation, check the version already installed. To check the installed version, run the following command on the terminal:

$uname -r

Check installed kernel

In the above output you can see the installed kernel version of CentOS 8.0.

It’s time to install a new kernel on your CentOS 8.0. To install a new kernel, run the following command on the terminal:

$dnf --enablerepo=elrepo-kernel install kernel-ml

Activate the kernel repository

In the above output image, you can see the latest available kernel version and dependencies will be installed on your system. A user confirmation prompt is displayed again on the terminal during the installation process. The user will be asked if they want to continue with the kernel installation or not. You enter the ‘y’ key on the keyboard.

Install the latest kernel on CentOS

When the installation is complete, restart your system to see the changes. When you have started CentOS 8.0 you will see an updated kernel installed on your system.

Reboot and choose a new kernel

As soon as you restart your system, open the terminal on your CentOS 8.0 again. Now check the installed version by running the following command on the terminal:

$ uname -msr

In the output, you can see the updated installed version in your terminal window.

Kernel updated successfully


An updated kernel with the latest hardware can improve the performance of your system. In this article, you learned how to update the CentOS 8.0 kernel. You learned about various commands for adding repositories and displaying the kernel version. I hope you are now able to update the system’s kernel. It is recommended that you do not need to update the system’s kernel if you are not having problems with your system.

How to upgrade the kernel to CentOS 8.0