How to Upgrade Linux Kernel in Ubuntu 16.04 Server

The first factor we wish to try and do before we tend to upgrade the kernel is to update the Ubuntu repositories and to upgrade all packages to their latest versions.

Connect to your ubuntu server through AN SSH login. you have got to be a root user for ensuing steps. If root login is disabled on your server, then login as your traditional user and run 'sudo -s to become root.

ssh [email protected]

Update all repositories of the system.

sudo apt update

Update ubuntu repository

Then upgrade all packages installed with the command below.

sudo apt upgrade -y

Finally, reboot the server to ensure that potentially installed kernel updates get applied.

sudo reboot

 Now check again for upgradable packages with the command below.

sudo apt list --upgradeable

Make sure you have no pensing updates.

Step 2 - Checking the Active Kernel Version

In this step, we are going to check the active kernel of our system. we'd like to grasp the system design and therefore the kernel version that's used on the system.

Check the active kernel utilized by the system with the uname command.

uname -msr

You will get the kernel version as below.

Linux 4.4.0-78-generic x86_64

This means, we are using the Generic Linux kernel version 4.4 with x86_64/64-bit system.

The Generic kernel is a general purpose kernel. If you want to use your box for tasks like editing, encoding video and audio, it's e.g. recommended to use one of the 'lowlatency' kernels.

Step 3 - Install New Kernel Version

Now we all know that we tend to area unit mistreatment kernel four.4 at the instant. during this step, we are going to upgrade the used kernel to the newest inject kernel build version four.11.2. All inject kernel build are often downloaded from this website -

Create a new directory for the mainline kernel version.

sudo mkdir -p ~/4.11.2
cd ~/4.11.2

Download the generic kernel version packages (because we are using generic version) using the wget command.


 Download Mianline Kernel Build 

Now install the packages with the dpkg command below.

dpkg -i *.deb

When the kernel package installation is complete, update grub and reboot the system.

sudo update-grub
sudo reboot

 Update Grub Ubuntu 16.04

After server rebooting, check again the kernel version.

uname -msr

You will get a new kernel on the system: 4.11.2.

Linux 4.11.2-041102-generic x86_64

A new Kernel Version has been Installed

Step 4 - Remove the old Kernel

At this stage, the kernel version of our server is updated to four.11.2. during this step, square measure going to} take away the recent kernel and simply leave the restructure that we tend to are victimisation currently.

For this purpose, we are going to use a command-line utility named 'byobu'. it is a nice utility to securely take away Associate in Nursingd purge an recent kernel from the system and can ne'er take away the presently running kernel.

Install byobu with the apt command below.

sudo apt install byobu

Install Byobu ubuntu 16.04 

Whet it's complete, check installed kernel version on the system.

dpkg -l | grep linux-image

We will get the result as below.

Get ubuntu kernel Installed on the System

On the server, iI have put in 3 versions of the Ubuntu kernel: four.4.62 - 4.4.78 - 4.11.2. And for currently, the system is victimization the most recent kernel four.11.2. we are going to take away the recent kernel four.4 and leave the most recent one four.11.2.

Run the command below to remove the old kernel.

sudo purge-old-kernels

If you see the result below:

No kernels are eligible for removal

Then you simply have two kernel versions put in. By default, byobu can keep a minimum of two kernel versions on the system to make sure that you just have a disengagement kernel once the primary one fails.

If you would like to stay the sole one (the latest) kernel, then you'll use the command below to get rid of all except one Kernel.

purge-old-kernels --keep 1 -q

Now update grub and you will get the only one kernel version installed on the system.

sudo update-grub

Remove Old Kernel Ubuntu 16.04

The Ubuntu Kernel now could be upgraded to the newest version four.11.2 from the inject kernel build, the previous kernel version has been faraway from the system for liberating disc space. 
















































































































































  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

DDOS and DNS A Records Need Why ?

It is required that all DDOS shared hosting clients use Rivalhost Global Protected Name-servers...

Can you change my PHP version?

All new shared hosting accounts are created on a server which runs php version 5.3.x or higher We...

Do you host adult sites or content?

Yes we have Offshore Server also Offshore/ anonymous location . you can host / or runs any type...

Can I have multiple domains point to the same website?

Yes. These are commonly referred to as "parked domains" and allow you to have multiple domain...

How long does it take for my account to be setup?

Generally, it will not take more than 24 hours for us to setup your account, unless we have...