How to Upgrade Kernel to Latest Version in Ubuntu
Periodically new devices and technology coming out and it’s important to keep our Linux system kernel up-to-date if we want to get the most of out it. Moreover, updating system kernel will ease us to take advantage of new kernel fuctions and also it helps us to protect ourselves from vulnerabilities that have been found in earlier versions.
Ready to update your kernel on Ubuntu or one of their derivatives such as Debian and Linux Mint? If so, keep reading!
Step 1: Check Installed Kernel Version
To find the current version of installed kernel on our system we can do:
$ uname -sr
The following image shows the output of the above command in a Ubuntu 16.04 server:
Step 2: Upgrading Kernel in Ubuntu
To upgrade the kernel in Ubuntu, go to http://kernel.ubuntu.com/~kernel-ppa/mainline/ and choose the desired version (Kernel 4.12 is the latest at the time of writing) from the list by clicking on it.
Next, download the
.deb files for your system architecture (see highlighted in yellow below for a 32-bit system):
$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.12/linux-headers-4.12.0-041200_4.12.0-041200.201707022031_all.deb $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.12/linux-headers-4.12.0-041200-generic_4.12.0-041200.201707022031_amd64.deb $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.12/linux-image-4.12.0-041200-generic_4.12.0-041200.201707022031_amd64.deb
Once you’ve downloaded all the above kernel files, now install them as follows:
$ sudo dpkg -i *.deb
Once the installation is complete, reboot your machine and verify that the new kernel version is being used:
$ uname -sr
And that’s it. You are now using a much more recent kernel version than the one installed by default with Ubuntu.
In this article we’ve shown how to easily upgrade the Linux kernel on Ubuntu system. There is yet another procedure which we haven’t showed here as it requires compiling the kernel from source, which is not recommended on production Linux systems.
If you’re still interested in compiling the kernel as a learning experience, you will get the instructions on how to do it at the Kernel Newbies page.
As always, feel free to use the form below if you have any questions or comments about this article.