On October 27th, the latest stable Linux kernel 4.2.5 became available for Ubuntu and other distributions based on Ubuntu. Let's see how to do a kernel upgrade in Linux Mint and Ubuntu, to possibly fix problems and add new features to our distribution.
We prepared this guide on Linux Mint 17.2 and Ubuntu 15.10. It should work on recent earlier and future versions, as well as on other distributions based on Ubuntu.
Do I need a kernel upgrade?
If technology has taught us anything, is that the larger version numbers are better versions of any given program - most of the time.
Still, doing a kernel upgrade isn't a task to be taken lightly. It's nothing like doing a sudo apt-get upgrade, or even a sudo apt-get dist-upgrade. It's more like changing the complete engine of the operating system.
That means that even though the latest kernel is "stable", the upgrade could very well cripple our system, and have us format and reinstall our Linux distribution.
So, doing a kernel upgrade on a production PC is off-limits. And we must budget time to do a complete reinstall, should the upgrade go sideways.
A kernel upgrade is a good idea mostly for developers, who want to make sure that he future versions of their apps will be compatible with the latest kernel.
It could also be useful if we have a specific hardware problem that can be traced to the Linux kernel. Other than that, though, if it ain't broke...
How to do a kernel upgrade in Linux Mint / Ubuntu
First order of the day, before we even download the new kernel, is to make sure our system is up to date.
Linux Mint / Ubuntu full update
We open a terminal with ctrl+alt+T and type:
sudo apt-get update && sudo apt-get dist-upgrade -y
Depending on the last time we did a full update and our internet speed, this could take a couple of minutes.
When the update concludes, and provided it didn't encounter any problems and give off any error messages, we should reboot the system, with:
Download the latest kernel version
We will find the deb files for the new kernel on
The latest kernel's folder should be on the bottom of the page. Unless you are feeling particularly adventurous, you should avoid the rc*-unstable versions.
Inside the folder, we need to download three files. If we have the 64bit version of Ubuntu or Linux Mint installed, we download the _all.deb file and the generic amd64.deb files.
If we have the 32bit version, again we download the _all.deb, this time with the generic i386.deb files.
We make sure we download the files, and not run them.
After all three files download, we open a terminal and navigate to the download folder - usually ~/Downloads
To do the kernel upgrade, we type:
sudo dpkg -i linux-headers-4*.deb linux-image-4*.deb
The installation will only take a few seconds.
After the installation is finished without any errors, we reboot. On the next boot, if everything went well, running the command...
...will show the new kernel version.
That's it. The kernel upgrade was successful.
If, for any reason, we need to uninstall the new kernel, we just need to run the command:
sudo apt-get remove linux-headers-4* linux-image-4*
What's new in Linux Kernel 4.2.5
Linux Kernel 4.2.5 mostly includes GPU updates, mainly for AMD graphics cards and a fix for the open-source Nvidia graphics driver, Nouveau.
There are also improvements to the ARM, ARM64, SPARC, and x86 hardware architectures, improvements to the Btrfs and NFS filesystems, and updated drivers for I2C, MD, MFD, PINCTRL, and networking.
Did you have any trouble with the kernel upgrade?
If anything on the guide didn't work as described, and you weren't able to do a kernel upgrade, leave us a comment.