Bootstrap FreeKB - Linux Commands - uname (display information about the kernel)
Linux Commands - uname (display information about the kernel)

Updated:   |  Linux Commands articles

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.

~]# uname
Linux

 


Show all

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

~]# 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.

~]# 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.

~]# uname -r
3.10.0-327.e17.x86_64

 

Or, based on the Linux distribution you are using, there may be a file such as /etc/redhat-release that includes a more human readable version of the release.

~]$ cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.9 (Maipo)

 


Kernel version

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

~]# 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.

~]# 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).

~]# 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.

~]# uname -o
GNU/Linux

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


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