How to Install Linux Kernel 5.15 on Rocky Linux 8

Linux kernel 5.15 is out with many new features, support, and security. The Linux 5.15 kernel release further improves the support for AMD CPUs and GPUs, Intel’s 12th Gen CPUs, and brings new features like NTFS3, KSMBD (CIFS/SMB3), and further Apple M1 support, amongst many other changes and additions.

In the following tutorial, you will learn how to install the latest 5.15 Linux Kernel on Rocky Linux 8.



Update Operating System

Update your Rocky Linux operating system to make sure all existing packages are up to date:

sudo dnf upgrade --refresh -y

The tutorial will be using the sudo command and assuming you have sudo status.

To verify sudo status on your account:

sudo whoami

Example output showing sudo status:

[joshua@rockylinux ~]$ sudo whoami

To set up an existing or new sudo account, visit our tutorial on How to Add a User to Sudoers on Rocky Linux.

To use the root account, use the following command with the root password to log in.


Import and Install ELRepo & GPG Key

The first step is to import the repository from ELREPO from the ELRepo project. This has the latest available kernel or the LTS version with regular updates, so you do not need to compile kernels and install and upgrade using the dnf package manager.

First, import the GPG key to verify the installation package:

sudo rpm --import

Next, install the repository, use the following command:

sudo dnf install

Example output:

How to Install Linux Kernel 5.15 on Rocky Linux 8

Type “Y,” then press the “ENTER KEY” to proceed.


Install Latest Kernel 5.15

With the repository and GPG imported, you can now proceed with the installation which you will use the ELRepo mainline branch to install kernel 5.15.

To install the latest mainline support kernel (NON-LTS):

sudo dnf --enablerepo=elrepo-kernel install kernel-ml kernel-ml-devel kernel-ml-headers
How to Install Linux Kernel 5.15 on Rocky Linux 8

Type “Y,” then press the “ENTER KEY” to proceed.

Now reboot your Rocky Linux system; during the boot window with the option of kernels to choose from, select kernel 5.15.



How to Install Linux Kernel 5.15 on Rocky Linux 8

Once back in your Rocky Linux system, verify the kernel and build:

uname -r

Example output:


Additionally, install the Neofetch package that will print out a fancy output in the terminal of your system specs.

sudo dnf install neofetch -y

Next, run the neofetch printout command.


Example output:

How to Install Linux Kernel 5.15 on Rocky Linux 8

Congratulations, you have installed the latest 5.15 kernel on your Rocky Linux 8 system.


Updates for Kernel 5.15

To keep your kernel 5.15 up to date, you will use the dnf refresh command to pull updates from the ELRepo repository just like any other package on your Rocky Linux system.

To check for updates and upgrade.

sudo dnf upgrade --refresh -y

Remember, for any kernel updates, and you will need to reboot your system:

Comments and Conclusion

In the tutorial, you have learned how to install the latest 5.15 kernel on your Rocky Linux. Note, if your system is a production server, it would be advised to use the existing kernel that ships with Rocky Linux for the most stability.

However, for those wanting to try kernel 5.15, you can undoubtedly swap back to previous kernels quite easily in the boot menu, so giving it a try isn’t a bad idea, especially if you got new hardware that isn’t supported by Rocky Linux’s kernel.

Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x