If you’re using cron job or control panel (such as cPanel) to automatically perform the update in Red Hat Enterprise Linux (RHEL) and CentOS or related distros using yum rpm based package manager, the kernel may be upgraded, but system is not yet restarted for new kernel to be used.
Use the following steps to determine if the system requires a reboot for kernel update:
- Check the latest version of kernel installed on the system with the one of the following commands:
rpm -q --last kernel | perl -pe 's/^kernel-(\S+).*/$1/' | head -n1
ls -t /boot/vmlinuz-* | sed "s/\/boot\/vmlinuz-//g" | head -n1
- Check the version of kernel currently in use with the following command:
- If the results of two commands are different, it means that newer version of kernel is available and installed, pending reboot.