I am Angelo. A systems engineer passionate about Linux and all open-source software. Although here I'm just another member of the family.

How to Install Kernel 6.x on Rocky Linux 9

Hello, friends. Upgrading the Linux kernel is an important but risky process that can improve support for our software. So today, you will learn how to install the 6.x kernel on Rocky Linux 9.

Rocky Linux is a very stable system that has one small limitation, and that is the slightly older version of the kernel. This can result in recent hardware not being recognized correctly.

Therefore, one of the main recommendations I can give you is to upgrade the kernel to a newer version.

Note: The process of upgrading the kernel is simple, but can lead to system instabilities. Only do it if you have hardware problems and you are sure about it. I also recommend you to make a backup

Install Linux Kernel 6.x on Rocky Linux 9

At the time of writing this post, version 6.2 is the latest stable version of the kernel. So, you will have to adapt the commands according to the new versions.

First, check the version of the kernel that you have

uname -r

Sample output


As you can see, it is a stable version, but a bit old.

To upgrade to a recent version of the Linux kernel, nothing better than to enable and use the elrepo repository; otherwise you will have to manually compile the kernel, and it is not convenient.

First, add the GPG key to the system:

sudo rpm --import

Then, add the repository in question

sudo dnf install
 Package                           Architecture              Version                             Repository                       Size
 elrepo-release                    noarch                    9.1-1.el9.elrepo                    @commandline                     12 k

Transaction Summary
Install  1 Package

Total size: 12 k
Installed size: 5.0 k
Is this ok [y/N]: 

This will be added. Now, you can install the latest version of the kernel. To achieve this, run.

sudo dnf --enablerepo=elrepo-kernel install kernel-ml
Install Kernel 6.x on Rocky Linux 9
Install Kernel 6.x on Rocky Linux 9

When the changes are applied, reboot the system.

sudo reboot

Then, recheck the kernel version.

uname -r

Sample output


Now you will see the changes already applied, and you will have a new version of the Linux kernel.


In this post, you know how to update the Linux kernel in Rocky Linux 9. This is dedicated to people with recent hardware that need a better support.


Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook