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.
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 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: $ 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:
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.
The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.