Tuesday, March 8, 2011

how to find kernel version in unix




How do I find out what kernel version I am currently running under Debian Linux or any other Linux distribution using a shell prompt?



Use uname command which print certain system information such as:
=> Kernel version and name
=> Print the machine hardware name
=> print the processor type
=> print the operating system etc

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


 

1 comment: