Mainline Kernels, installs "mainline" kernel versions on Ubuntu and any Debian derivatives

Mainline Kernels

Many Linux distributions, in fact I would say most, use at least a slightly customized version of the kernel. There are some that don't, that use the kernel that Linus Torvalds develops and are maintained by other contributors, but Ubuntu uses one in each new version and is maintained by Canonical. When there is something to solve, they are the ones in charge of applying the patches. This is fine, but we also have the option of using Mainline to use just that, the mainline versions of the kernel.

"Mainline" translates into Spanish as "main line", and in the case of the kernel we could translate it as the purest kernel, the main one, that of Torvalds and company. And before continuing with this article, I would like to comment on one thing: no need to use main kernel and I wouldn't recommend doing it unless you're experiencing a very gross bug that we think might go away with another kernel. But Linux allows us to decide what to do, and here we are going to talk about the tool, which is a fork of the now proprietary Greatness, not of other things.

How to install Mainline on Ubuntu/Debian based distros

It can be compiled, but why are we going to complicate ourselves a little more if we can pull from a repository. Mainline has its own PPA, and the following commands are typical for adding the repository, updating all of them, and installing the software:

sudo add-apt-repository ppa:cappelikan/ppa sudo apt update sudo apt install mainline

Even so, whoever prefers to compile it, and also in case the repository fails or ceases to exist, the commands would be the following:

sudo apt install libgee-0.8-dev libjson-glib-dev libvte-2.91-dev valac aria2 lsb-release make gettext dpkg-dev git clone cd mainline make sudo make install

Once installed we can find the graphical tool in the application drawer, so the next step would be to launch it.

Open Mainline Kernels

How to install versions mainline of the kernel

For those of you who use or have used distributions like Manjaro or Garuda Linux that have their own kernel version management tool, Mainline will look familiar. The main window is like this:

Ukuu successor main window

The different sections:

  • Core: the kernel version.
  • Block: Check the box to prevent it from being deleted.
  • State: empty if we do not have it installed and installed if yes. In addition, we can also see which one is running.
  • Notes: We can add notes. For example, if a kernel presents a problem or what we use it for.
  • On the right are the options, among which are "Uninstall Old", which can remove, for example, previous versions of the Ubuntu kernel, Reload, which checks if there have been changes since the moment we opened the application, and Settings, from where we can, for example, activate notifications to let us know when there are new versions of the kernel.
  • At the bottom we see a summary with what is running and the latest available.

What we do not find are somewhat old versions or Release Candidates, the latest ones because they have not reached stable, but they can be shown if we activate the verification box from the Configuration.

If we want to install a kernel, all we have to do is click on the row where the one we want is and then on Install. A window will open, the download and installation will begin, for which it asks us for the password, and when it is finished we will see the "finished" message. To use the new kernel it is only necessary to reboot.

Choose the kernel from GRUB

On Linux, when there is more than one kernel version installed, we can choose which one we want to start from GRUB. When we see it, we have to go to “Advanced options for Ubuntu” and choose the one that suits us. This can be useful if something has gone wrong and we want to use a kernel that we know works.

What if I don't see GRUB?

In the case of not seeing GRUB, you have to make it show up. We open a terminal, write sudo nano /etc/default/grub, we change the time by modifying the line to GRUB_TIMEOUT = 5 (5 is the time in seconds) and show the menu with Grub_timaout_style = menu. Once we make the changes, Ctrl+O saves the document, Ctrl+X exits nano and with sudo update-grub We update the GRUB options.

As a personal recommendation, I would advise leaving the Ubuntu kernel installed. Mainline Kernels shows them with the Ubuntu logo, as seen in the screenshots. An unmodified mainline kernel shouldn't be a problem, but locks exist for a reason.

And this is the way to install the "main" Linux kernel on Ubuntu and other Debian-based distros. Of course, if we decide what we want.

More information.

Leave a Comment

Your email address will not be published. Required fields are marked with *



  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.