How to Upgrade the Kernel on CentOS 7

28/12/2020
Chưa phân loại

By default, CentOS 7 uses an old version of kernel, which is 3.10.x. But the old kernel doesn’t support some new hardwares that we have today. So it’s necessary to update the old kernel for better hardware support.  In this article I will show you how to update the kernel of CentOS 7. Let’s get started.


Preparing for the Kernel Upgrade:

We must add ELRepo repository to CentOS 7 to update the kernel of CentOS 7. For more information, check the official website of ELRepo at http://elrepo.org/tiki/tiki-index.php.  First we have to add the GPG key for ELRepo. To do that, run the following command:

$ sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

Now we can add the ELRepo repository on CentOS 7. To do that, run the following command:

$ sudo rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm

The name of the ELRepo kernel repository is called elrepo-kernel.  There are 2 kernels in ELRepo. One is called kernel-lt and the other is called kernel-ml. The difference between these 2 are, kernel-lt package provides the Long Term Support version of the latest Linux kernel, and the kernel-ml package provides Mainline Stable version of the latest Linux kernel. The kernel provided by kernel-ml is more updated than kernel-lt. Both of these kernels are safe. You can use any of them.

I will show you how to install both of them, but I will install kernel-ml in this article.

You can check the version of the currently installed kernel on CentOS 7 with the following command:

$ uname -r

You can see that; the kernel CentOS 7 is using right now is 3.10.0. We will soon update that. Let’s continue.


Installing Latest Long Term Support Kernel:

You can easily install long term support kernel or kernel-lt package provided by ELRepo on CentOS 7. At the time of this writing, the version of the kernel provided by kernel-lt package is 4.4.100.

To install kernel-lt package on CentOS 7 from ELRepo, run the following command:

$ sudo yum --enablerepo=elrepo-kernel install kernel-lt

Press ‘y’ and press <Enter> to continue.

Once the installation is complete, just restart your computer. When it boots, select the new kernel from the GRUB menu. Your CentOS 7 operating system should use the new kernel afterwards.


Installing Mainline Stable Kernel:

You can easily install mainline stable kernel or kernel-ml package provided by ELRepo on CentOS 7. At the time of this writing, the version of the kernel provided by kernel-ml package is 4.14.1.

To install kernel-ml package on CentOS 7 from ELRepo, run the following command:

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



Now press ‘y’ and then press <Enter> to continue:

It should take a while to download and install the kernel.  Once the installation is complete, run the following command to restart your computer.

$ sudo reboot

Once your computer boots, select the new kernel from the GRUB menu, it should be using the latest kernel that you just installed.

You can check and verify that its using the latest kernel with the following command:

$ uname -r

You can see that the kernel is updated.

So That’s how you update/upgrade the kernel of your CentOS 7 operating system. Thanks for reading this article.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

How to work with Jupyter Notebooks in PyCharm

If you are an aspiring data scientist today or someone in the field of Computer Science in general, it is impossible for...
29/12/2020

How to Split a File of Strings with Awk

The Linux awk command(abbreviated from the names of the developers; Aho, Weinberger, and Kernighan) is a great way to process...
29/12/2020

Hướng dẫn add host để checkmk giám sát

Sau khi cài đặt xong check_mk thì tất nhiên chúng ta sẽ phải thêm host vào để chúng ta giám sát chúng....
30/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Hướng dẫn fake ip bằng phần mềm SStap
10/06/2025

VPS treo game là gì? Thuê VPS treo game giá rẻ, không lo giật lag
02/06/2025

 BitBrowser – Best Anti-Detect Browser!
26/05/2025

Dịch Vụ Xây Dựng Hệ Thống Peering Với Internet Exchange (IXP)
04/04/2025

Dịch Vụ Triển Khai VPN Site-to-Site & Remote Access
04/04/2025