WebMasterCampus
WEB DEVELOPER Resources

Linux uname Command

Learn Linux uname Command with examples


In Linux, we can use “uname” command displays basic system information. Uname stands for UNIX name.

“uname” prints operating system details and machine hardware platform information of your Linux computer.

uname Command Syntax

>> uname [options]

uname Command Example

When used without any options, the uname command displays the operating system name.

>> uname
Option Description
-a Display all information about the operating system; Kernel version; and hardware
-n Display only the network node hostname
-m Display the hardware platform name of the system
-o Display the operating system name
-p Display the processor type
-s Display the Kernel name
-r Display the Kernel release version
-v Display the Kernel version with date

uname -a Command

>> uname -a

Linux DESKTOP-J9U3UM3 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

uname -n Command

The hostname is used by the Linux operating system to communicate with other nodes in a network. The uname -n command can be used to display the hostname of your Linux computer.

>>  uname -r

uname -m Command

The uname command can also be used to display machine hardware name, processor information, and hardware platform information. Use uname -m to print the machine hardware name.

>>  uname -m

The output of –m, -p, and –i options are often the same:

uname -o Command

The uname -o print the operating system name.

>>  uname -o

uname -r Command

The information displayed by the uname -a command is unorganized and could be difficult to read.

If you need specific information about your system Kernel, such as the release number of the Kernel, use uname -r command:

>>  uname -r

uname -v Command

You can combine uname options to display better information. For example, to display release number and compile date, type:

>>  uname -r -v
Created with love and passion.