Linux Commands

How to Update Linux/Ubuntu Kernel to the Latest One?

How to Update Linux Ubuntu Kernel to the Latest One

To bridge the communication between the hardware and software of a Linux system kernel plays a vital role. The Linux kernel is an open-source software which can be modified or decompiled also it is the foundation on which the Linux system operates. To improve the user experience, it is always recommended to check for kernel updates regularly, but these updates will only be related to the base kernel of the specific distros. If a new base kernel is released, you can also run your system based on that kernel by updating to a new kernel version.

How to Update Linux/Ubuntu Kernel to the Latest One?

Updating the kernel as mentioned above can allow users to enjoy the newly introduced features, which can make the execution of tasks easy and rapid. Moreover, it also enhances the security and stability of the system, there are numerous ways to update the kernel and those are:

Method 1: Through Mainline Kernel Installer

One of the easiest ways to update the kernel version is by using the mainline kernel installer, which is an essential tool for updating the kernel. It is a GUI tool that can safely update the kernel, here are some steps to be followed to update the kernel:

Step 1: Update System Packages

Updating the packages for the default package manager before updating the kernel is a preventive step to avoid any errors arising due to outdated packages list so for that execute:

sudo apt update

Step 2: Check Current Kernel Version

Checking the current kernel version gives the insight of next version for an update, so now check the current kernel version of your Linux system and for that execute:

uname -r

Step 3: Add the Cappelikan Repository

To install the mainline, we need to add the cappelikan repository as it comes with the packages for kernel so to add the repository execute:

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

Step 4: Install Mainline Kernel on Linux

After adding the repository, it is always necessary to update the package list so repeat the first step and afterward execute:

sudo apt install mainline -y

Step 5: Update the Linux Kernel to the latest One

Launch the mainline kernel application on your Linux machine and select the option of Uninstall Old because to upgrade the kernel to the latest version the old version is to be uninstalled:

Now, once the old kernel is uninstalled, select the latest version and click on install:

Now the new version will start to download and will install once the download is complete:

Step 6: Reboot your Linux System

To apply the changes after updating the kernel version, the reboot of the system is a must as it refreshes the system and afterward look for the kernel version to verify the update:

Method 2: Through Kernel Header Files

Another way to update the Linux kernel to the latest version is by downloading it by deb file manually and then installing it through the default package manager. Here are some necessary steps to be followed to install the update through deb file:

Step 1: Download the deb file for the Latest Kernel

The deb files for all the older and newer kernel versions can be downloaded from the mainline kernel page. So, visit the mainline kernel index page and scroll down to the bottom of the page to find the latest version file, click on it:

Now download all these files one by one and create a directory in the download folder to keep the file separate from other files in the download directory:

Step 2: Install the Kernel Latest Version

Once the file is downloaded and placed in a separate directory, open the terminal and navigate to that respective directory. Now install all the files using the dpkg package manager, and for that execute the below command:

sudo dpkg -i linux-headers*.deb

Step 3: Reboot your Linux System

Once the installation is complete reboot the system and then check the version of the kernel to see if the version is updated and for that execute:

uname -r

Method 3: Through Force Kernel Update

The Linux kernel can be updated to its latest version by using the dist-upgrade command. This command can handle the scenarios when a certain application requires some dependencies or when the removal of some packages is required. Before performing the force update it is advisable to update the packages list for the default repository, here is the command for updating the Linux kernel:

sudo apt-get dist-upgrade

Method 4: Through Software Updater

Every operating system comes with a software updater that regularly checks for updates, so the kernel can be updated using the software updater. For that here are some steps that are to be followed:

Step 1: Launch and Configure the Software Updater

First launch the update manager from the application menu and from there navigate to the settings of the software & updates. In the settings, select the following options in the tab named as “updates”:

Afterward, select the following options under the tab “Notify me of a new Ubuntu version”:

  • To opt for the tested and reliable Ubuntu versions that have full support, then in that case opt for the option of For long-term support versions.
  • The new versions are normally a little bit buggy but also come with new features and options so in that case opt for the option For any new version.

Step 2: Install the Updates

Now relaunch the update manager and see if it shows the pending updates, if yes then just select the update to install it. If the update manager does not show the updates automatically, then execute :

update-manager –d


The kernel is a vital component of the operating system that is responsible for managing the operations of a system. It also bridges the communication between data processing and applications on the hardware level through system calls. Therefore, having the updated version of the kernel is quite necessary to keep the system’s performance stable. On Linux, the kernel can be updated by numerous methods like using the mainline kernel installer, through the update manager, and through downloading the deb file of the latest kernel version.

Similar Posts