
I am assuming that you already know what is Linux kernel. This is the core software that drives any Linux distribution. This is what Linus Torvalds created around 30 years ago and this is what he still works on.
A newer version of the Linux kernel is released every few months with new features (such as support for more hardware), bug fixes, etc.
But most Linux distribution does not provide the latest Linux kernel unless you are using an Arch-based distribution or some other rolling release distribution.
Linux distributions are responsible for your system’s stability and this is why they don’t release a newer version of Linux Kernel to its users unless they test it for regression on their end. They often use a specific kernel release as the base and provide updates on this base kernel, instead of giving you the latest mainline kernel.
This does not mean that you cannot use the latest Linux kernel in Ubuntu or other distributions you are using.
In this tutorial, I’ll discuss various ways to get a new Linux kernel on Ubuntu.
Using the latest Linux kernel version in Ubuntu: Things you should know
In my opinion, there is no ‘real’ need of upgrading to a newer Linux kernel unless it provides you a good enough reason.
Why install a new Linux kernel version manually?
What could be such a reason? Well, suppose the new Linux kernel introduces support for your sound card or Wi-Fi card or some other hardware component. You read some official forum that the problem you are having with the hardware component could be fixed with a newer Linux kernel version.
HWE kernel option is also available
You should also keep in mind that Ubuntu has this hardware stack enablement (HWE) feature that lets you use somewhat newer Linux kernel on an Ubuntu LTS release.
Older kernels remain available
Another thing to note here is that installing a new kernel doesn’t mean that the older kernel has been removed from the system. It remains at your disposal. By default, Ubuntu boots into the newest Linux Kernel installed on the system.
Two ways of installing new kernel in Ubuntu: Command line and GUI
There are two ways to install newer Linux kernel:
- Manually download the DEB file for new Linux kernel and install it in terminal
- Use a GUI tool like Ukuu and install newer Linux kernel
The GUI tool Ukuu is not open source anymore and it locks a few features which I have discussed in its section.
Let’s see the methods.
Method 1: Manually install new Linux kernel in Ubuntu using command line
The latest Linux kernel is called the mainline Linux kernel. You’ll see this term used often.
Step 1: Check current installed version
You may want to first check current installed version of kernel. You can do this by using the uname command in the terminal:
uname -r
As you can see in the output below, I have kernel version 5.4 installed.
[email protected]:~$ uname -sr
Linux 5.4.0-40-generic
Step 2: Download the mainline Linux kernel of your choice
Now you have to download the desired kernel build provided by Ubuntu from here.
You can see kernel list like this. I am going to download kernel 5.7. You also should keep in mind to install the stable kernel instead of rc (release candidate).

Now download appropriate kernel files for your architecture. For 64 bit architecture, you should download these kind of files
- linux-headers-VERSION-NUMBER_all.deb
- linux-headers-VERSION-NUMBER_amd64.deb
- linux-image-VERSION-NUMBER_amd64.deb
- linux-modules-VERSION-NUMBER_amd64.deb
Hence I will download these files:

Step 4: Install the downloaded kernel
Now it’s time to install downloaded kernel. First do into the directory where you’ve downloaded kernel and enter following command. Make sure there isn’t any other “.deb” file in that directory other than downloaded kernel files.
sudo dpkg -i *.deb

It will take some time. After installation finished, you will see screen like this.

Step 5: Reboot Ubuntu and enjoy the new Linux kernel.
Now you’ve installed new kernel in Ubuntu successfully, it’s time to reboot the machine. Ubuntu by default boots into the newer kernel version.
After rebooting, check kernel version with same uname -sr
command you used earlier. As you can see, it’s updated to 5.7.0.

Rollback the changes and downgrade Linux kernel
If you didn’t like new Linux Kernel or if you discovered issues with it. You can easily downgrade the Kernel. You just have to:
- Boot into an older kernel
- Remove the newer Linux kernel you don’t want
Let’s see how to do that.
When you are booting into your system, on the grub menu, select the Advanced options for Ubuntu.
If you do not see the grub menu, try holding the shift key or use Esc key to bring the grub menu.

In here, you’ll see all the Linux kernels installed on your system. Select an older one. Don’t choose the recovery mode, just go with the normal ones.

Now that you have booted into your good old kernel, we have to remove new kernel.
You can use the apt or dpkg command to remove the installed kernel version. Do you remember the version of new kernel you installed manually? For me it was kernel 5.7. So here’s what I use to delete it.
Change the commands with the version you want to install:
sudo apt remove linux-headers-5.7.0*
sudo apt remove linux-image-5.7.0*
sudo apt remove linux-modules-5.7.0*
You can see, I have two packages associated with kernel 5.7.0. If I remove the first package it will automatically remove all it’s related dependencies.

Method 2: Upgrade Linux Kernel in Ubuntu Ukuu GUI tool
You can upgrade Linux kernel on your own in Linux command line. But the kernel upgrade procedure is much easier and more convenient with a GUI tool called Ukuu (Ubuntu Kernel Update Utility).
This GUI tool is developed by Tony George who has provided us with several other useful tools for Ubuntu such as battery monitor for Ubuntu, app backup tool Aptik etc.
You should know that Ukuu of version above 18.9 is now paid and closed source. Version 18.9 is still free and open source.
Paid version contains additional features like:
- Downloading and installing newer kernel versions automatically
- Deleting downloaded packages after install
- Option to stay on same series of a kernel release
- Automatically removing older kernels.
- UI improvements.
If you want the additional features, you can purchase it from developer’s official website. Ukuu free version can still be used for installing and removing kernels, though.
Step 1: Install Ukuu in Ubuntu
You can download the deb files for the old Ukuu version 18.9 which is free to use but not updated lately.
Step 2: Install kernel with Ukuu
Once you have installed Ukuu, start it. It will refresh the list of available Linux kernels available for Ubuntu.
By default, it will show you all the available kernels, including the unstable release kernel (tagged with RC and with red Tux icon).
Kernel versions from the distributions are labeled with the logo and the other versions have just the good old Tux logo.

As you can see I have kernel 5.7.0 installed already, now I will install kernel 5.7.1 using Ukuu.
Again, you should avoid the release candidates. Select the desired Kernel version and click on install to install the newer Linux kernel version.

Of course, it will require admin password for this action. Once you have entered your password, you can see the installation progress in the application itself. Focus on the end result to know if it new Linux kernel was installed successfully or not.

Note: If the installation fails, no need to panic. Nothing will be wrong the system. Just try a different Kernel version and it might work.
You should see something like this when installation finished successfully.

Once installation finishes, you’ll see a very helpful screen that tells you if anything goes wrong with the new Linux kernel, you can always choose to boot into the older kernel from the grub menu.

When you boot into the system next, you’ll be running the Linux kernel you had just installed.
Rollback the changes/Downgrade Linux Kernel with Ukuu
Rollbacking done in two steps:
- Boot into an older kernel
- Remove the newer Linux kernel you don’t want
Let’s see how to do that.
When you are booting into your system, on the grub menu, select the Advanced options for Ubuntu.

Select your old kernel to boot into it.

Once you boot into the system with the older Linux kernel, start Ukuu again. Make sure that you are not deleting the kernel that you are running at present.
Select the newer kernel version which you don’t want anymore and click on Remove.

That’s all you need to do here to downgrade the Linux kernel in Ubuntu.
While we are discussing it, I would like to point out a few more features of Ukuu. Ukuu has settings option that allows you to not display release candidates of kernels in the list. You can also hide Linux kernel versions older than version 4.0.

You can also choose the option to display desktop notifications in case new Linux Kernel are available.
You can also remove Ukuu using apt remove ukuu command.
How do you upgrade Linux kernel?
I hope this tutorial was helpful in showing you how to install the mainline Linux kernel in Ubuntu.
So, do you often upgrade the Linux kernel on your own or do you wait for your distribution to provide the upgrade? How do you do it?