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 16.04 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 16.04
To upgrade the kernel in Ubuntu 16.04, go to http://kernel.ubuntu.com/~kernel-ppa/mainline/ and choose the desired version 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.9.13/linux-headers-4.9.13-040913_4.9.13-040913.201702260631_all.deb $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9.13/linux-headers-4.9.13-040913-generic_4.9.13-040913.201702260631_i386.deb $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9.13/linux-image-4.9.13-040913-generic_4.9.13-040913.201702260631_i386.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 16.04.
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.