Home AlmaLinux How to Install Latest Linux Kernel in AlmaLinux 8

How to Install Latest Linux Kernel in AlmaLinux 8

AlmaLinux needs no introduction as a free and open-source RHEL-based Linux operating system distribution. Its binary compatibility with RHEL (Red Hat Enterprise Linux) attributes it to a production-grade enterprise operating system with growing community support.

A Kernel is a lifeline between hardware and software interaction within a computer system. Since the Kernel code always resides in memory, its presence is critical in how these key operating system components communicate with one another.

This article is for the bleeding edge enthusiasts who want to install the latest Kernel version on their AlmaLinux 8 distribution.

Prerequisites

  • Have root/sudoer user privileges on the AlmaLinux system you are using.
  • Have some basic knowledge of using the Linux command-line environment.

Installing Kernel in AlmaLinux 8

First, make sure your system should be up-to-date for performance optimization.

$ sudo dnf update -y 

Next, install ELRepo and import the GPG key on the AlmaLinux system for RPM support.

$ sudo dnf -y install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm
$ sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

Our configured ELRepo repository is associated with the elrepo-kernel channel which provides kernel-ml and kernel-lt for long-term support and the latest stable mainline kernels respectively.

The command for listing available mainline kernel releases is as follows:

$ sudo dnf --disablerepo="*" --enablerepo="elrepo-kernel" list available | grep kernel-ml 
List kernel-ml Packages
List kernel-ml Packages

The command for listing long-term kernel releases is as follows:

$ sudo dnf --disablerepo="*" --enablerepo="elrepo-kernel" list available | grep kernel-lt
List kernel-lt Packages
List kernel-lt Packages

We can now install the mainline (ml) and long-term (lt) kernel 5.x versions.

$ sudo dnf --enablerepo=elrepo-kernel install kernel-ml-{devel, headers}
$ sudo dnf --enablerepo=elrepo-kernel install kernel-lt

After installation, reboot your AlmaLinux system.

$ sudo reboot

After a successful system reboot, from the Grub menu, you should be able to use either of the ELRepo-installed kernels (kernel-ml version 5.18 or kernel-lt version 5.4) to boot into your AlmaLinux system.

Choose AlmaLinux Kernel
Choose AlmaLinux Kernel

For instance, we can go with the first selected option and confirm its viability from the AlmaLinux system terminal.

$ uname -r
Check AlmaLinux Kernel
Check AlmaLinux Kernel

We have successfully learned how to install the Linux kernel in AlmaLinux.

Ravi Saive
I am an Experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies. Founder of TecMint.com, LinuxShellTips.com, and Fossmint.com. Over 150+ million people visited my websites.

Each tutorial at UbuntuMint is created by a team of experienced writers so that it meets our high-quality standards.

Was this article helpful? Please add a comment to show your appreciation and support.

Got something to say? Join the discussion.

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published or shared. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.