Smart Ads


List Installed Kernels and Currently Running Kernel

Question sent in by Tim from Kansas City.

Q: Is there a way I can check to see if I a system has a newer kernel installed?  For example, if a system has installed a new kernel, but has not yet rebooted to load it?

A: Yes, you can check the currently running kernel as well as which kernels are installed.  This will give you version numbers and you can see if there is an installed version higher than the running version.

To check which kernel is currently running on your system, use the uname command with the "release" or -r switch.  This will output the kernel version (release) number.

uname -r
Sample output:

savona@biguntu:~$ uname -r

Now that you know which kernel you are currently running, you can check the installed kernels and see if there are any later releases.

For Debian based systems (Ubuntu, Mint, etc..) you can use dpkg (output truncated for readability).

savona@biguntu:~$ dpkg --list | grep linux-image
ii  linux-image-4.13.0-16-generic              4.13.0-16.19
ii  linux-image-4.13.0-17-generic              4.13.0-17.20
ii  linux-image-extra-4.13.0-16-generic        4.13.0-16.19
ii  linux-image-extra-4.13.0-17-generic        4.13.0-17.20
ii  linux-image-generic              

For RedHat or RPM based systems (CentOS, Fedora, etc..) you can use the rpm command.

[savona@Cetnos7VM ~]$ rpm -q kernel

No comments:

Post a Comment