How to update kernel version on centOS


The Linux kernel is the foundation on which all Linux distributions work. It is open source software – anyone can decipher, examine and edit the code.

Updated versions of the kernel improve security, add functionality, and improve operating system speed.

Step 1: Checking Installed Kernel Version

$ sudo uname -r

To enable the ELRepo repository on CentOS 7 , do:

$ sudo rpm --import
$ sudo rpm -Uvh

Once the repository has been enabled, you can use the following command to list the available kernel.related packages:

$ sudo yum --disablerepo="*" --enablerepo="elrepo-kernel" list available

Next, install the latest mainline stable kernel:

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

Step 3: Step Default Kernel Version in GRUB

Open and edit the file /etc/default/grub and set GRUB_DEFAULT=0.

Next, run the following command to recreate the kernel configuration.

$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Now restart the server

And  check

$ sudo uname -r

You may also like...

Leave a Reply

Your email address will not be published.