How to find the version of a Linux kernel
ITMS 8.x
Following are five distinct ways to find the kernel version on a linux box:
Sample results:
# uname -r
2.6.18-8.el5
# cat /proc/version
Linux version 2.6.18-8.el5 ([email protected]) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)) #1 SMP Fri Jan 26 14:15:14 EST 2007
# rpm -q kernel
kernel-2.6.18-8.el5
# dmesg | grep -i "linux version"
Linux version 2.6.18-8.el5 ([email protected]) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)) #1 SMP Fri Jan 26 14:15:14 EST 2007
# ls /boot
config-2.6.18-8.el5
initrd-2.6.18-8.el5.img
symvers-2.6.18-8.el5.gz
vmlinuz-2.6.18-8.el5
grub
lost+found
System.map-2.6.18-8.el5