The latest kernel has arrived, but as you've probably already assumed, it won't be available to Ubuntu distributions for some time. Why is that? Ubuntu has always been a step behind with the latest releases of software because it takes a rather Debian-like approach to upgrades. In other words, stability takes priority.
It's not that the latest kernel isn't stable, but the teams behind the distributions haven't had the time to fully test the newest release against the entirety of the operating system.
Also: The 5 best rolling release Linux distributions - and why you should be using one
That doesn't stop you from wanting all the new features, patches, and bug fixes that come along with the latest, greatest kernel.
If you're itching to test (or use) the latest kernel on Ubuntu (or Ubuntu-based distributions), you're not out of luck, as you can install the latest kernel, and I'm going to show you how.
Keep in mind that it's generally best to wait for the kernel to hit the standard repositories for your distribution. But there might be an instance where you need a feature in the latest kernel, or maybe you have new hardware that isn't fully supported in the older kernels. In that case, you might want the HWE (Hardware Enablement Kernel), which supports newer hardware.
With that said, let's make this happen.
What you'll need:The only things you'll need for this are a running instance of Ubuntu (or an Ubuntu-based distribution) and a user with sudo privileges. I highly recommend you first try this on a test machine or virtual machine, so you don't wind up breaking something on your main computer.
The kernel I will demonstrate this with is version 6.13, which is a mainline kernel.
We'll start out by checking the currently installed version of the kernel with the command:
Show moreuname -r
The next thing we'll do is create a folder to house the downloaded files. Do that with the command:
Show moremkdir ~/Downloads/kernels
The mainline kernel files can be downloaded from the mainline site. You'll want to make sure to click on the sub-folder containing the kernel that you want (in this case, 6.13, because that's the latest stable version). You'll need to download the following files into your newly created directory:
Also: 5 lightweight Linux distributions that will bring your old PC back to life
Show moreFrom within the ~/Downloads/kernel folder, issue the following command to install the downloaded files:
Show moresudo dpkg -i *.deb
When the installation is complete, restart your machine, and you should be presented with an option to select the latest kernel. You can verify by issuing the uname -r command, which should result in 6.13.0-061300-generic.
Also: The first 5 Linux commands every new user should learn
There's another method of installing the latest kernel, which is by way of the Mainline Kernels tool. This tool allows you to easily select which kernel you want and install it from within an easy-to-use GUI.
Here's how to install this handy tool.
The first thing to do is add the necessary repository, which can be achieved with the command:
sudo add-apt-repository ppa:cappelikan/ppa
Next, let's update APT with the command:
sudo apt update
3. Install the Mainline App
Finally, install the Mainline app with:
sudo apt install -y mainline
You can now open the Mainline Kernels app, select the kernel you want to install, and click Install.
Also: Want to save your old computer? Try these 6 Linux distros
Installing different kernels with the Mainline Kernels tool is a no-brainer.
Jack WallenAnd there you have it -- two methods for installing the latest Linux kernel on Ubuntu. You will likely find the latest kernel performs better and supports even more new hardware.
Also: 5 best Linux commands for troubleshooting problems (and how I use them)
Enjoy that freedom.