Tuesday 10 August 2010

Find Linux / UNIX Kernel Version

This command works under all Linux distroubtions and other UNIX like operating systems such as FreeBSD, OpenBSD, Solaris, HP UX etc. Type the following command to see running kernel version:
$ uname -r
Output:
2.6.22-14-generic
Where,
2 : Kernel version
6 : The major revision of the kernel
22 : The minor revision of the kernel
14 : Immediate fixing / bug fixing for critical error
generic : Distribution specific sting. For example, Redhat appends string such as EL5 to indicate RHEL 5 kernel.
Another common usage:
$ uname -mrsn
Output:
Linux moon.nixcraft.in 2.6.18-53.1.4.el5 x86_64
/proc/version file
You can also obtain kernel version from /proc/version file:
$ less /proc/version
$ more /proc/version
$ cat /proc/version
Output:
Linux version 2.6.18-53.1.4.el5 (brewbuilder@hs20-bc2-3.build.redhat.com) (gcc version 4.1.2 20070626 (Red Hat 4.1.2-14))

No comments:

Post a Comment