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 Automatically Send Text Messages on Android Using Python

The process of sending text messages can be automated easily using the Python Programming Language by writing a few lines...
29/12/2020

Install Anaconda Python and Jupyter Notebooks for Data Science

Getting started with Anaconda To explain what is Anaconda, we will quote its definition from the official website: Anaconda is...
29/12/2020

10 best apps to install on elementary OS

The power and efficiency of an operating system is highly dependent on the applications that we can install in it. A great...
29/12/2020
Bài Viết

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

Mua Proxy V6 Nuôi Facebook Spam Hiệu Quả Tại Onetcomvn
03/06/2024

Hướng dẫn cách sử dụng ProxyDroid để duyệt web ẩn danh
03/06/2024

Mua proxy Onet uy tín tại Onet.com.vn
03/06/2024

Thuê mua IPv4 giá rẻ, tốc độ nhanh, uy tín #1
28/05/2024

Thuê địa chỉ IPv4 IPv6 trọn gói ở đâu chất lượng, giá RẺ nhất?
27/05/2024