This guide provides a comprehensive walkthrough for installing or upgrading the Linux Kernel to version 5.x on AlmaLinux 8. The latest kernel versions bring enhanced features, improved hardware support, and security updates. Follow the steps below to safely upgrade your kernel on AlmaLinux 8.

Step 1: Check Current Kernel Version

Before proceeding with the upgrade, it’s essential to know the version of the kernel your system is currently running. This information will help you confirm the upgrade’s success later. Use the following command to check your current kernel version:

uname -r

The output will display the current kernel version, allowing you to compare it post-upgrade.

Step 2: Enable ELRepo Repository

ELRepo is a community repository that provides newer kernel versions for Enterprise Linux distributions. To access the latest kernels, you’ll need to enable this repository on your AlmaLinux system. Start by importing the ELRepo GPG key:

rpm --import
rpm -Uvh

Step 3: Install the Linux Kernel 5.x

With ELRepo enabled, you can now proceed to install the Linux Kernel 5.x. Use the following command to list available kernels:

yum --disablerepo='*' --enablerepo='elrepo-kernel' list available | grep kernel

Identify the Kernel 5.x version from the list and install it using:

yum --enablerepo=elrepo-kernel install kernel-ml

The ‘kernel-ml’ package represents the ‘Mainline’ stable kernel version.

Step 4: Update GRUB Configuration

After installing the new kernel, ensure your system boots from it by updating the GRUB configuration. First, set the new kernel as the default boot option:

grub2-set-default 0

Then, regenerate the GRUB configuration file:

grub2-mkconfig -o /boot/grub2/grub.cfg

Step 5: Reboot and Verify

To finalize the installation, reboot your system:


Once the system boots up, verify that the new kernel version is in use by running:

uname -sr

The output should now reflect the updated kernel version 5.x.


Congratulations, you’ve successfully upgraded the Linux Kernel to version 5.x on your AlmaLinux 8 system. This upgrade enhances your system’s capabilities and security. Remember to monitor your system for any issues post-upgrade and enjoy the new features and improvements.

Server Hosting Solutions by RackNerd:

Shared Hosting
cPanel Web Hosting in US, Europe, and Asia datacenters
Reseller Hosting
Create your new income stream today with a reseller account
VPS (Virtual Private Server)
Fast and Affordable VPS services - Instantly Deployed
Dedicated Servers
Bare-metal servers, ideal for the performance-demanding use case.

Leave a comment

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