Home RHEL How to Install Latest Linux Kernel in RHEL 8

How to Install Latest Linux Kernel in RHEL 8

A Kernel is somewhat the soul of an operating system since it exists at its core. Once you start/boot your machine, the Kernel takes control of the entire system. Each RHEL 8 distribution is shipped with a custom-built kernel.

Since a Kernel is the primary bridge of communication between the hardware and software components of an entire computer system, it is responsible for such a system’s integrity and supported hardware compatibility. Also, it is the kernel that provides an interfacing link between system processes and computer hardware.

The main functions associated with the system kernel include the following:

  • Process Management – The system kernel has an authoritative verdict on the time and duration of processes that should assign themselves to the CPU (Central Processing Unit).
  • Memory Management – The location and exact usage of assigned system memory are monitored by the kernel.
  • Device Drivers – Hardware and processes interaction need a kernel mediator/interpreter called device drivers.
  • System Calls and Security – This kernel functionality ensures that service requests sent by processes are received.

The installation of the Linux kernel on RHEL 8 will also highlight the following kernel-related packages:

  • Kernel – It is the main kernel package targeted for installation and caters to multi-core, multi-processor, and single-core systems.
  • Kernel-devel – The sufficiency of kernel makefiles and headers provided by this package helps build; against kernel packages, and system modules.
  • Kernel-headers – User-space programs and libraries are interfaced with the Linux system kernel through availed C header files.
  • Kernel-tools – The kernel source’s supporting documentation and tools/directory are availed in this package.
  • Perf – This package makes it possible to monitor the performance of the Linux kernel via a perf tool.
  • Linux-firmware – The operational functionality of various machine-connected devices is made possible via the firmware files availed by this package.

Prerequisites

Make sure you meet the following requirements:

  • You have sudoer/root user privileges on the RHEL 8 system you are using.
  • You are comfortable with using the Linux command-line environment.

We are now ready to address the objective of this article which is to install the latest Linux kernel (i.e. 5.18.8) packages on RHEL 8, which are built from the sources obtainable from the “mainline stable” branch of The Linux Kernel Archives.

Installing Kernel in RHEL 8

First, update your RHEL 8 system for optimal performance.

$ sudo dnf update -y

Next, install ELRepo and import the GPG key on RHEL 8 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

Now, we can choose to go with the mainline kernel (kernel-ml), long-term kernel (kernel-lt), or both as listed in the elrepo-kernel channel.

To list available kernel-ml releases, run:

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

To list available kernel-lt releases, run:

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

Now we will install kernel-ml and kernel-lt releases as shown.

$ sudo dnf --enablerepo=elrepo-kernel install kernel-ml
$ sudo dnf --enablerepo=elrepo-kernel install kernel-lt

After installation, reboot your RHEL 8 system.

$ sudo reboot

After a successful system reboot, the newly installed kernel versions should be visible from the Grub menu.

Choose New Kernel from Grub
Choose New Kernel from Grub

Log in to your system with the default selection and confirm its version.

$ uname -r 
Check New Kernel Version
Check the New Kernel Version

We have successfully covered the installation of the Linux kernel in RHEL 8.

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.