Display information about the kernel using the UNAME command in Linux

Home > Search > Linux commands
  by

The uname command can be used to view information about the kernel being used. The uname command without any options will probably display the name of the kernel. In this example, the name of the kernel is Linux.

[john.doe@server1 ]# uname
Linux

 


Show all

The -a or --all option can be used to view all of the kernel information.

[john.doe@server1 ]# uname -a
Linux john.doe 3.10.0-327.e17.x86_64 #2015011654723 SMP Mon Jan 01 00:00:01 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

 


Kernel name

Similar to the uname command without any options, the -s or --kernel-name option will display the kernel name. In this example, the name of the kernel is Linux.

[john.doe@server1 ]# uname -s
Linux

 


Kernel release

The -r or --kernel-release option can be used to view the kernel release number. The structure of the kernel version is <major> <minor> <revision>. For example, if the kernel is 3.10.0, the kernel is the 3 major, 10 minor, 0 revision. The reason this is noteworthy is because when minor is an even number, it's considered a stable production version. If minor is an odd number, it's considered a development version.

[john.doe@server1 ]# uname -r
3.10.0-327.e17.x86_64

 


Kernel version

The -v or --kernel-version option can be used to view the version of the kernel. 

[john.doe@server1 ]# uname -v
#2015011654723 SMP Mon Jan 01 00:00:01 UTC 2015

 


Hardware architecture

The -i or --hardware-platform option can be used to view the hardware architecture. This means the kernel supports both 32-bit and 64-bit hardware.

[john.doe@server1 ]# uname -i
x86_64

 


Processor type

The -p or --processor option can be used to view the processor type. This means the kernel supports both 32-bit and 64-bit central processing units (CPU).

[john.doe@server1 ]# uname -p
x86_64

 


Operating system

The -o or --operating-system option will display the name of the operating system according to the kernel. In this example, the name of the operating system is GNU/Linux. It is important to recognize that this may not print the name of the distribution being used, such as Red Hat, CentOS, Ubuntu, Debian, or Fedora.

[john.doe@server1 ]# uname -o
GNU/Linux

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments