e Learning

How to Update centos kernel in Linux CentOS 7

You should always upgrade the centos kernel whenever the new kernel updates are available, to keep your server up to date. kernel update in CentOS 7 is easy and fairly straightforward.

So In This tutorial We will discuss how to update centos kernel in Linux CentOS 7.

Step One

Check the current kernel version

Before we do any updates we should check what is the currently running kernel version on our CentOS server using uname command.

uname -r

Step Two

Check for new kernel updates

We can use yum info command to check whether new updates are available

yum info kernel

Step Three

Update CentOS 7 Kernel

yum update kernel

Update centos kernel
Step Four

Reboot the System

systemctl reboot

When we update the kernel it does not remove or alter existing kernel. What happens is CentOS install the new kernel while keeping the old one. During the system startup, we can still select the old version from the GRUB boot screen.

two kernel versions available in the GRUB boot men after update

As you can see now we have two kernel versions available in the GRUB boot menu. So after upgrading If you have any difficulties, you can boot the server using the old centos kernel from the boot menu.