How to install latest kernel on CentOS Linux 7 using yum command

I am a new CentOS Linux 7 user who runs it on my Laptop. I liked the operating system. Is there is a way to run latest/stable Linux kernel on a CentOS Linux version 7?

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:
$ cat /proc/version
Sample outputs:

Linux version 3.10.0-514.21.2.el7.x86_64 ( (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:
$ 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)

How To Check Linux Kernel Version

Step 1 – Enable ELRepo

From the project home page:

It is an RPM repository for Enterprise Linux packages. ELRepo supports Red Hat Enterprise Linux (RHEL) and its derivatives (Scientific Linux, CentOS & others). The ELRepo Project focuses on hardware related packages to enhance your experience with Enterprise Linux. This includes filesystem drivers, graphics drivers, network drivers, sound drivers, webcam and video drivers.

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 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:
$ wget
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
Sample outputs:

pub  1024D/BAADAE52 2009-03-17 (RPM Signing Key for <>
      Key fingerprint = 96C0 104F 6315 4731 1E0B  B1AE 309B C305 BAAD AE52
sub  2048g/B8C66E6D 2009-03-17

If the fingerprint matches, import the GPG key with the rpm command.
$ sudo rpm --import

Install ELRepo for CentOS 7

Again using the wget command.
$ wget
Sample outputs:

--2017-06-25 19:06:34--
Resolving (
Connecting to (||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8584 (8.4K) [application/x-rpm]
Saving to: elrepo-release-7.0-2.el7.elrepo.noarch.rpm’
100%[===================================================================================================================================>] 8,584       --.-K/s   in 0s      
2017-06-25 19:06:34 (163 MB/s) - ‘elrepo-release-7.0-2.el7.elrepo.noarch.rpm’ saved [8584/8584]

Step 2 – Install elrepo

Type the following yum command:
# yum install elrepo-release-7.0-2.el7.elrepo.noarch.rpm
Sample outputs:

Fig.01: Installing ELRepo for my CentOS 7 box

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:
$ yum list available --disablerepo='*' --enablerepo=elrepo-kernel
Sample outputs:

 * elrepo-kernel:
Available Packages
kernel-lt.x86_64                               4.4.73-1.el7.elrepo           elrepo-kernel
kernel-lt-devel.x86_64                         4.4.73-1.el7.elrepo           elrepo-kernel
kernel-lt-doc.noarch                           4.4.73-1.el7.elrepo           elrepo-kernel
kernel-lt-headers.x86_64                       4.4.73-1.el7.elrepo           elrepo-kernel
kernel-lt-tools.x86_64                         4.4.73-1.el7.elrepo           elrepo-kernel
kernel-lt-tools-libs.x86_64                    4.4.73-1.el7.elrepo           elrepo-kernel
kernel-lt-tools-libs-devel.x86_64              4.4.73-1.el7.elrepo           elrepo-kernel
kernel-ml.x86_64                               4.11.7-1.el7.elrepo           elrepo-kernel
kernel-ml-devel.x86_64                         4.11.7-1.el7.elrepo           elrepo-kernel
kernel-ml-doc.noarch                           4.11.7-1.el7.elrepo           elrepo-kernel
kernel-ml-headers.x86_64                       4.11.7-1.el7.elrepo           elrepo-kernel
kernel-ml-tools.x86_64                         4.11.7-1.el7.elrepo           elrepo-kernel
kernel-ml-tools-libs.x86_64                    4.11.7-1.el7.elrepo           elrepo-kernel
kernel-ml-tools-libs-devel.x86_64              4.11.7-1.el7.elrepo           elrepo-kernel
perf.x86_64                                    4.11.7-1.el7.elrepo           elrepo-kernel
python-perf.x86_64                             4.11.7-1.el7.elrepo           elrepo-kernel


  1. Long term support kernel package name is kernel-lt version 4.4.xx
  2. Mainline stable kernel package name is kernel-ml version 4.11.xx

Step 4 – Install kernel version

To install long term support kernel, run:
# yum --disablerepo='*' --enablerepo=elrepo-kernel install kernel-lt
To install mainline stable kernel, run:
# yum --disablerepo='*' --enablerepo=elrepo-kernel install kernel-ml
Sample outputs:

Fig.02: Installing mainline stable Linux kernel for my CentOS 7 box

Step 5 – Boot into new kernel

Type the following reboot command to reboot the Linux box:
# reboot
# shutdown -r now
# shutdown -r 0

Step 6 – Verification

Find out the current Linux kernel version using any one of the following command:
$ 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:
$ uname -mrs
Sample outputs:

Linux 4.11.7-1.el7.elrepo.x86_64 x86_64


I strongly suggest that if you need the latest kernel for hardware support/drivers, get Fedora Linux latest. My professional opinion is you only use distro supplied kernel for security reasons on server or cloud computing. However, Linux or CentOS does not restrict your freedom. Another option is to compile Linux kernel from the source code itself.

And there you have it, the latest version of mainline Linux kernel up and running on a CentOS Linux 7.x. For more info see the project home page here.

🐧 Please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
0 comments… add one

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @