Monday, 20 April 2015

Find Linux / UNIX Kernel Version Command


 uname command display the Linux or Unix Kernel Version.


     anusree@anusree-Inspiron-5547:~$ uname -r
     3.16.0-30-generic


  • 3 : Kernel version
  • 16 : The major revision of the kernel
  • 0 : The minor revision of the kernel
  • 30 : Immediate fixing / bug fixing for critical error.
  • generic : Distribution specific sting. For example, Redhat appends string such as EL5 to indicate RHEL 5 kernel. 

Different option with uname.  With no OPTION, same as -s.

       -a,      --all                                     print all information

       -s,      --kernel-name                     print the kernel name

       -n,      --nodename                        print the network node hostname

       -r,       --kernel-release                  print the kernel release

       -v,       --kernel-version                  print the kernel version

       -m,      --machine                           print the machine hardware name

       -p,       --processor                         print the processor type or "unknown"

       -i,        --hardware-platform          print the hardware platform or "unknown"

       -o,      --operating-system              print the operating system

       --help                                           display this help and exit

       --version                                       output version information and exit


We can also find the kernel version using /proc/version file. (Linux only Command).

1)
anusree@anusree-Inspiron-5547:~$ less /proc/version
Linux version 3.16.0-30-generic (buildd@kissel) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015


2)
anusree@anusree-Inspiron-5547:~$ more /proc/version
Linux version 3.16.0-30-generic (buildd@kissel) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015



3)
anusree@anusree-Inspiron-5547:~$ cat /proc/version
Linux version 3.16.0-30-generic (buildd@kissel) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015

No comments:

Post a Comment