Ubuntu Mainline Kernel Installer

Jarret B

Well-Known Member
Staff member
May 22, 2017
Reaction score
Most of you may have used the Ubuntu Kernel Update Utility (UKUU), which now requires a paid license to use it (see this article).

There is a new program, which is a fork of UKUU, that is free. It is the Ubuntu Mainline Kernel Installer.


To install the Ubuntu Mainline Kernel Installer, you need to add a Personal Package Archive (PPA). In a Terminal, add the PPA with the command:

sudo add-apt-repository ppa:cappelikan/ppa

The system should ask you to press ‘[ENTER]’ to continue adding the PPA.

The system should perform an automatic package update, but if not:

sudo apt update

Now that the PPA is included in the package updates and the packages have been updated, we can install the Mainline program:

sudo apt install mainline -y


Once Mainline is installed, you can start it from the menu. After it loads, it will contact ‘kernel.ubuntu.com’ and download the list of kernels.

Once the list is downloaded, you should see a list of all the install kernels and the newest available kernel. In my case, this is the kernel version 6.0.0, as shown in Figure 1.



If you want to see more versions in the list, we’ll need to change a setting. So, click on the ‘Settings’ button on the right side of the Mainline window. You should see a window similar to Figure 2.



You should notice that in the status bar of the ‘Settings’ window is the version of the currently running kernel.

What you want to change is the value of ‘Show N Major Previous Versions’. If left at ‘0’, it shows the newest version and those installed. If you set the value to ‘1’, then you’ll see all versions of 5.x and 6.0.0. Make the change and allow the program to download the files to update the list. If the list is not displayed correctly, then click on the ‘Refresh’ button. The program should update again and the list should display correctly, as shown in Figure 3.



Installing a Kernel

Once you have the list of kernels and the one you want is displayed, click on it to select it. Once selected, click on ‘Install’ button to install the desired kernel.

A Terminal type window should appear and display the progress of the kernel installation on the system. After it downloaded the proper packages, then you will be asked for the password to grant the program Root access to install the new kernel.

Once it finishes everything, the last line in the Terminal should be ‘Close window to exit…’. To close the window, just click on the ‘Close’ button at the bottom of the Terminal.

The program should update the listing again to show that it listed the newly selected kernel as ‘Installed’.

If you want to run the newly installed kernel, you need to reboot. Before the Ubuntu screen appears, you’ll want to hold down the shift key. You’ll only need to hold down the ‘Shift’ key if the GRUB boot screen doesn’t appear. Choose the Advanced option and then select the desired kernel version that you want to load.

Once you restart with the new kernel and load Mainline, it should show ‘Running’ to the right of the selected kernel version.

Uninstall a Kernel

You can select a kernel that is listed as installed, but not running, to uninstall.

Before you uninstall a kernel version, be sure that the new version works. Check all major programs, especially VirtualBox, to be sure they operate correctly with the new version.

In Mainline, select the version that you want to remove. Once it is selected, click on the ‘Uninstall’ button.

The Terminal should appear like when it installs a kernel. The process should continue for a bit and ask you for the Root password to be able to remove the files with privileged access.

When prompted like before, click on the ‘Close’ button.

If you want to remove all the kernel versions older than the running version, click on the button labeled ‘Uninstall Old’.

Kernel Changes

If you want to see detailed information on the changes made in a kernel version from the previous version, highlight the kernel version and click on ‘Changes’.

NOTE: The selected kernel does not need to be installed or running to view the changes.

A window should appear that shows the changes made in the version you selected. These changes are the modifications made since the last version that ‘makes it better’ than the previous version. If there is a specific ‘bug’ or issue you want to find, then look through the list for the change.

If you look at version ‘6.0.0’ you can scroll down and see that Linus Torvalds made 29 updates to the kernel.

Removing the Program

Just in case you want to remove the Mainline program and PPA, you can perform the following commands:

sudo add-apt-repository --remove ppa:cappelikan/ppa
sudo apt remove mainline

Everything should be removed, except for any kernels that you installed using the Ubuntu Mainline Kernel Installer.


The Mainline program is a good tool to aid you in updating your kernel. It also gives you information on what versions are available.

It makes for an easy way to update the kernel and keep on top of changes to the kernels available to an Ubuntu system.

Members online