Install Linux Kernel 4.0 in CentOS and Ubuntu


Install Linux Kernel 4.0 in RPM based systems

I am going to show you how to install Kernel 4.0 in RPM based systems, for example CentOS 7.

Here is my CentOS 7 system’s current kernel version:

uname -r



ELRepo Repository has the latest stable Kernel 4.0. So let us add this repository in our CentOS 7 system.

First, add ELRepo GPG key:

rpm --import

Add ELRepo now:

rpm -Uvh

Finally, enable ELRepo and install Kernel 4.0 using command:

yum --enablerepo=elrepo-kernel install kernel-ml

Enter ‘Y’ to continue.

Loaded plugins: fastestmirror
elrepo                                                   | 2.9 kB     00:00     
elrepo-kernel                                            | 2.9 kB     00:00     
(1/2): elrepo/primary_db                                   | 229 kB   00:03     
(2/2): elrepo-kernel/primary_db                            | 779 kB   00:07     
Loading mirror speeds from cached hostfile
 * base:
 * elrepo:
 * elrepo-kernel:
 * epel:
 * extras:
 * updates:
Resolving Dependencies
--> Running transaction check
---> Package kernel-ml.x86_64 0:4.0.0-1.el7.elrepo will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package        Arch        Version                    Repository          Size
 kernel-ml      x86_64      4.0.0-1.el7.elrepo         elrepo-kernel       36 M

Transaction Summary
Install  1 Package

Total download size: 36 M
Installed size: 163 M
Is this ok [y/d/N]: y

That’s it. Reboot your system. Select kernel 4.0 and hit Enter key.

CentOS 7 -1 [Running] - Oracle VM VirtualBox_002Now, check if Kernel 4.0 is correctly installed:

uname -r



If you want to install Kernel 4.0 on a system with Secure Boot enabled, refer this link.

If you had any problems after installing the new Kernel, reboot your system. Select previous Kernel from the boot menu.

Finally, remove the Kernel 4.0 using command:

yum remove kernel-ml

Reboot your system once again to use the previous kernel.