How to Upgrade The Kernel On Ubuntu & Centos

Well, let us show you how to upgrade the kernel.

Enter the following command to know about your current kernel version:

uname -r

Then, Let’s Update our system.

On Ubuntu:

sudo apt-get update

On CentOS:

yum update

To update Kernel, you need to install the following prerequisites.

On Ubuntu:

sudo apt-get gcc
sudo apt-get groupinstall "Development Tools"
sudo apt-get install ncurses-devel
sudo apt-get install libncurses5-dev
sudo apt-get install python-dev

On CentOS:

yum gcc
yum groupinstall "Development Tools"
yum install ncurses-deve
yum install libncurses5-dev
yum install python-dev

Then go to site, and chose any version you need, Here I will download 3.14.4.

On Both Ubuntu & CentOS:

tar xvfvJ linux-3.14.4.tar.xz -C /usr/src
cd /usr/src/linux-3.14.4

Before compiling a new kernel, you need to generate a kernel configuration.

If you want to generate a kernel configuration via graphical user interface, run with root user:

make menuconfig

if you want to use the same kernel configuration as the currently running kernel, run the following command instead. You still need to set any newly added configuration options by manually answering questions. If you do not know the meaning of each option, just press enter to accept a default answer.

make oldconfig

If you want to use the same old kernel configuration, and automatically accept default answers to every question, run the following command instead:

sh -c 'yes "" | make oldconfig'

After kernel configuration is done, go ahead and compile a new kernel.


when you do (make) this step will take about 45 minutes, depending on your Ram and CPU speed.

Now install the new kernel by:

make modules_install install

Finally, reboot your system and choose new kernel.

kernel 2

That’s it.


Tags: , ,