How to Update Kernel to the Latest One on Ubuntu?

In Linux, the Kernel is the crucial part of the operating system for communication with the hardware and software. It performs various functionalities such as scheduling tasks, device management, memory management, interrupt handling, and process management. The user needs to update the Kernel version for better and smooth communication with hardware and software.

This article will elaborate on the methods to update the kernel to the latest version.

Method 1: Update the Kernel Through Ubuntu Mainline Application

The “Mainline” is the application that provides the features to install the older or the latest version of Kernel. The implementation of the method to update the latest Kernel Version is described in the below-given steps:

Step 1: Check the Current Kernel Version

First, check the current version of the Kernel using the “uname” command:

$ uname -sr

The current Kernel version is 5.15.0-58-generic.

Step 2: Add Repository

Add the following repository in order to install the “Mainline” Application:

$ sudo add-apt-repository ppa:cappelikan/ppa -y

Step 3: Install Mainline

After successfully adding the repository to the operating system, install the “Mainline” tool using the following command:

$ sudo apt install mainline

Step 4: Launch the Mainline

Launch the “Mainline” from the applications menu:

Step 5: Install the Latest Kernel 

You will see the following interface having a sidebar for installing, removing, or refreshing the Kernel versions. Choose the latest Kernel version (6.1.9) and install it by clicking on the “install” button:

After clicking on the “install” button, the installation process will begin and will take a certain time to install the Kernel version:

Once the installation process is completed, close the window and restart your operating system.

Step 6: Reboot the System

To restart the operating system, use the reboot command in the terminal:

$ sudo reboot

Verify the Change

Let’s check the Kernel version through the “uname” command:

$ uname -sr

The Kernel version is 6.1.9 as shown in the above image.

Method 2: Update Kernel Using Deb Files of Kernel 

Another method to update the Kernel to the latest version is by manually downloading the Debian files of the Kernel and executing those Debian files. 

Step 1: Download the Kernel Files

Open the link in the browser and download the highlighted files by clicking on it:

Step 2: Trace the Downloaded Files

Jump into the “Downloads” directory (or where the files are downloaded) through the “cd” command:

$ cd Downloads

To check the downloaded files, you can run the “ls” command in the terminal:

$ ls

The files are available in the directory. 

Step 3: Install the Kernel Files

Now, install all these Debian files using the given command to update the Kernel to the latest version. Make sure there is no other Debian file in the directory as the wildcard character (*) is being used:

$ sudo dpkg -i *.deb

After executing the above command, the version of Kernel will be updated to the latest one.

Step 4: Reboot the System

Restart the system using the system reboot command:

$ sudo reboot

Verify the Change

Check the version of the Kernel using the “uname” command:

$ uname -sr

The Kernel version is 6.1.9 as can be seen in the above image.

Conclusion

To update the Kernel version in Linux, use the “Mainline” tool and install the latest Kernel version or manually download the Debian files for updating the Kernel. The installation of the “Mainline” tool and updating the Kernel to the Latest version are given in the guide. This write-up has illustrated the possible methods to update Kernel to the latest one on Ubuntu.