Installing the latest mainline kernel on Ubuntu Print

  • 5

This is an example article and may well be out of date by the time you are reading, so please disregard the absolute links and find the exact latest ones from the upstream folder. (i.e. http://kernel.ubuntu.com/~kernel-ppa/mainline/ )

First, let's create a new directory for our kernel packages:

mkdir kernels
mkdir kernels/v5.19
cd kernels/v5.19/

Now, let's download the latest headers, generic, and image packages:

wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.19/amd64/linux-headers-5.19.0-051900-generic_5.19.0-051900.202207312230_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.19/amd64/linux-headers-5.19.0-051900_5.19.0-051900.202207312230_all.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.19/amd64/linux-image-unsigned-5.19.0-051900-generic_5.19.0-051900.202207312230_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.19/amd64/linux-modules-5.19.0-051900-generic_5.19.0-051900.202207312230_amd64.deb

Unless you're doing something that requires low lantency I/O -- such as audio or video recording or streaming -- then you'll only want the generic package and headers. If you do need the low latency I/O then replace the generic ones with low-latency packages.

Next, we'll want to install our packages:

dpkg -i *.deb

And finally, we need to reboot:

reboot

If at any point we want to uninstall this kernel -- i.e. in favour of a newer one down the line -- simply do:

apt remove 'linux-headers-5.19.0*' 'linux-image-5.19.0*' 'linux-modules-5.19.0*'
reboot

Was this answer helpful?

« Back