CentOS Linux 7.x runs the Linux kernel version 3.10.xx. Both RHEL and CentOS does not provide an updated version of Linux kernel. RHEL backports patches for the Linux kernel version 3.10.xx. However, it is posssilbe to compile your own kernel or install pre built kernel using a third party repo. This tutorial shows you how to install the latest stable (mainline stable) Linux kernel version on a CentOS 7 using yum command. The following instructions should work on RHEL 7.x and clones such as Oracle 7.x, Scientific Linux and more.
Before you being
You can find out the current Linux kernel version using any one of the following command:
Sample outputs:
$ cat /proc/version
Sample outputs:
Linux version 3.10.0-514.21.2.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Tue Jun 20 12:24:47 UTC 2017
Or use old good uname command:
Sample outputs:
$ uname -mrs
Sample outputs:
Linux 3.10.0-514.21.2.el7.x86_64 x86_64
Finally, use the cat command to see the contains of /etc/centos-release file:
$ cat /etc/centos-release
CentOS Linux release 7.3.1611 (Core)
Step 1 – Enable ELRepo
From the project home page:
Import the public key
Warning: Please note that installing a new kernel not officially supported by both RHEL and CentOS project. It is also possible that your system may not boot. As the kernel-ml/lt packages are built from the source tar balls provided by kernel.org without any modifications to the code, they can contain some differences when compared to the CentOS/RHEL distribution kernels. Hence, you must keep backups of all important files before you do this.
Grab the GPG key using wget command:
Check the fingerprint of the GPG key with the gpg command to make sure it matches the key published by elrepo.
Sample outputs:
$ wget https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
Check the fingerprint of the GPG key with the gpg command to make sure it matches the key published by elrepo.
$ gpg --quiet --with-fingerprint RPM-GPG-KEY-elrepo.org
Sample outputs:
If the fingerprint matches, import the GPG key with the rpm command.
$ sudo rpm --import RPM-GPG-KEY-elrepo.org
Install ELRepo for CentOS 7
Again using the wget command.
Sample outputs:
$ wget http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
Sample outputs:
Step 2 – Install elrepo
Type the following yum command:
Sample outputs:
# yum install elrepo-release-7.0-2.el7.elrepo.noarch.rpm
Sample outputs:

Step 3 – List all packages in the yum elrepo repositories available to be installed
Type the following yum command to list all packages in elrepo-kernel repo:
Sample outputs:
$ yum list available --disablerepo='*' --enablerepo=elrepo-kernel
Sample outputs:
Where,
- Long term support kernel package name is kernel-lt version 4.4.xx
- Mainline stable kernel package name is kernel-ml version 4.11.xx
Step 4 – Install kernel version
To install long term support kernel, run:
To install mainline stable kernel, run:
Sample outputs:
# yum --disablerepo='*' --enablerepo=elrepo-kernel install kernel-lt
To install mainline stable kernel, run:
# yum --disablerepo='*' --enablerepo=elrepo-kernel install kernel-ml
Sample outputs:

Step 5 – Boot into new kernel
Type the following reboot command to reboot the Linux box:
OR
OR
# reboot
OR
# shutdown -r now
OR
# shutdown -r 0
Step 6 – Verification
Find out the current Linux kernel version using any one of the following command:
Sample outputs:
$ cat /proc/version
Sample outputs:
Linux version 4.11.7-1.el7.elrepo.x86_64 (mockbuild@Build64R7) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Sat Jun 24 09:49:01 EDT 2017
Or use old good uname command:
Sample outputs:
$ uname -mrs
Sample outputs:
Linux 4.11.7-1.el7.elrepo.x86_64 x86_64