How to Install Linux Kernel 5.16 on Rocky Linux 8 / Alma Linux 8

The kernel is one of the fundamental parts of Linux distributions. It offers us, among other things, support for our hardware and many other things. Many define it as the heart of the system. Today, you will learn how to install Linux Kernel 5.16 on Rocky Linux 8 / Alma Linux 8.

Advantages of having a recent kernel

The kernel is in charge of hardware management. So having a recent kernel can improve the performance of the computer.

On the other hand, some configurations may not always be recognized in the best way. So, this process is best done when you are sure of it or when you have a hardware failure that can be corrected by a kernel update.

This post is dedicated to the installation of Linux 5.16 which is one of the latest kernel versions. This new version includes many support improvements and security fixes that newer hardware will be able to take advantage of.

So let’s get started. The process is faster and easier than you might think.

Install Linux Kernel 5.16 on Rocky Linux 8 / Alma Linux 8

Unfortunately, recent kernel versions are not included in the official Rocky Linux 8 / Alma Linux 8 repositories. However, there is an external repository with which we can do it without too much trouble.

Remember that although it is a safe process, it can always fail. So if all your system works perfectly, I recommend you think twice and make a backup.

Let’s go for it.

First, update the whole system

sudo dnf update

Now we have to add the external repository called elrepo which contains updated kernel packages that we can use for our purpose.

To add it, you have to run this command

sudo dnf install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm

The above command downloads and installs an RPM package that adds and configures the external repository.

Then, add the GPG key of the repository.

sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

After that, to install Linux Kernel 5.16 just run the following command

sudo dnf --enablerepo=elrepo-kernel install kernel-ml kernel-ml-devel kernel-ml-headers

Then, wait for the process to finish.

When it is finished, just reboot the computer.

Once the system has booted, you can check the changes by running the command

uname -r

You will get an output similar to this

5.16.12-1.el8.elrepo.x86_64

With this, we are done.

Conclusion

Having a recent version of the kernel is a good way to get the most out of your recent hardware. However, it is a process that we have to do with caution, and it is only recommended to do it when we have a problem.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top