Mainline – Another Tool to Install Latest Kernel in Ubuntu / Linux Mint

Last updated: April 24, 2024

Mainline is a graphical tool to install the latest mainline Kernel in Ubuntu, Linux Mint, and derivatives.

Mainline (Ubuntu Mainline Kernel Installer) is an open-source fork of ukuu, which now is pay for use. It offers a simple interface with updated list of the “mainline” Kernels, allows to one-click install, remove, or purge Kernels in Ubuntu-based distributions.

Mainline features:

  • Fetches list of available kernels from Ubuntu Mainline PPA
  • Optionally watches and displays notifications when a new kernel update is available
  • Downloads and installs packages automatically
  • Display available and installed kernels conveniently
  • Install/remove kernels from gui
  • For each kernel, the related packages (headers & modules) are installed or removed at the same time

How to install Mainline in Ubuntu:

NOTE: The mainline kernels are provided by Ubuntu Kernel Team for testing and debugging purposes. They are not supported and are not appropriate for production use. You should only install these if they may fix a critical problem you’re having with the current kernel.

The software has an official PPA so far contains packages for Ubuntu 18.04, Ubuntu 19.10, Ubuntu 20.04, and derivatives.

1.) To add the PPA, open terminal from system application launcher and run command:

sudo add-apt-repository ppa:cappelikan/ppa

2.) Then check updates and install the tool via commands:

sudo apt update

sudo apt install mainline


To remove the PPA, run command:

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

To remove the Ubuntu Mainline Kernel Installer, run command:

sudo apt remove mainline


I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee:

14 responses to Mainline – Another Tool to Install Latest Kernel in Ubuntu / Linux Mint

  1. kde plasma ftw! August 14, 2020 at 8:03 pm

    Sweet, thank you!

  2. Is it necessary to purge present kernel before installing another one?
    Thank you

  3. luigi provencher January 9, 2021 at 12:30 pm

    Well that didn’t take long. lol How long has this been around?

  4. But… how do you launch the GUI??? Running ‘mainline’ on the console only seems to execute it as a CLI program…

  5. mainline –check responds with Segmentation Fault:

    ~# strace mainline –check

    Found installed: 4.15.0-140.144
    Found installed:
    ) = ?
    +++ killed by SIGSEGV +++

    ~# uname -rs
    Linux 4.15.0-142-generic

    ~# lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 18.04.5 LTS
    Release: 18.04
    Codename: bionic

  6. I follow your instructions and I get “unable to locate package mainline”
    What does one do in this case.

    • Make sure the first command run successfully:

      sudo add-apt-repository ppa:cappelikan/ppa

      Or you may download the package from the PPA package page. Scroll down in that page, click the triangle icon for your Ubuntu edition, and select download the package with .deb extension. And, you may install the .deb package either by double-clicking to open it via “Software Install” utility, or use command:

      sudo apt install ~/Downloads/mainline_*.deb
  7. can i install it for ubuntu 16.04 xenial??

  8. I’m wondering why the mainline app doesn’t install the associated linux-headers for a release. I installed 5.18.15 using mainline but the linux-headers were not installed. I managed t get them installed by performing a download then installing the deb packages manually.

    $ sudo mainline –list-installed
    mainline 1.0.15
    Distribution: Linux Mint 21
    Architecture: amd64
    Running kernel: 5.18.15-051815-generic
    Found installed: 5.18.15-051815.202207291649

    $ dpkg –list | egrep -i –color ‘linux-image|linux-headers|linux-modules’ | awk ‘{ print $2 }’

    I had to manually install linux-headers-5.18.15-051815 and linux-headers-5.18.15-051815-generic

  9. Note that these kernel packages are missing quite a bit that would be needed on most systems, and many dkms modules and other tools won’t work with them (NVIDIA drivers, VMware modules, etc.).

    These packages also will not install nor boot on ARM64 (RPi4 for example), despite being spun for those architectures because they lack DTBs and correctly aligned headers.

    On AMD64, you’ll find that the cloud tools and tools packages are missing, and installing them would try to bring in libssl3 and an incompatible libc6 from a newer release of Ubuntu, which will most-certainly break userland.

    You have been warned. DO NOT run this in production.

    • setuid

      Thanks for an informative reply, Is there a way to get Nvidia drivers to work with latest Ubuntu mainline kernel?