Skip to content

uname Linux command

The uname command in Linux is used to get information about the system such as the kernel name, network node hostname, kernel release, kernel version, machine hardware name, and processor type. It also provides information about the operating system. By default, uname -a is used to display all system information. Other options like -s, -r, -m, and -p can be used to display specific information. The uname command is helpful for system administrators and users who need to retrieve system information quickly and efficiently.

uname Syntax:

Terminal window
uname [option]

Options:

OptionDescription
-aDisplay all information
-sPrint the kernel name
-nPrint the network node hostname
-rPrint the kernel release
-vPrint the kernel version
-mPrint the machine hardware name
-pPrint the processor type or “unknown”
-iPrint the hardware platform or “unknown”
-oPrint the operating system

Parameters:

ParameterDescription
NoneNo parameters exist for the uname command

uname bash Examples:

Display System Information

Terminal window
uname

This command displays system information such as the kernel name, node name, kernel release, kernel version, machine hardware name, and operating system.

Display Kernel Version

Terminal window
uname -r

Using this option, you can specifically display the kernel release version of the current system.

Display Processor Type

Terminal window
uname -p

This command shows the type of processor the system is using.

Display Operating System

Terminal window
uname -o

By using this option, you can display the operating system name.

Display Operating System and Architecture

Terminal window
uname -a

Using this option combines multiple pieces of system information into a comprehensive display, including the operating system and architecture.

Display Machine Hardware Name

Terminal window
uname -m

Shows the machine hardware name the system is running on.

uname Command Help Center:

How do I use uname in Linux?

To use the uname command in Linux, execute the following command:

Terminal window
uname

How can I display the kernel name with uname?

To display the kernel name using uname, run the following command:

Terminal window
uname -s

How to show the network node hostname with uname?

You can display the network node hostname using uname with the following command:

Terminal window
uname -n

How to get the kernel release information with uname?

To get the kernel release information using uname, use the command:

Terminal window
uname -r

How can I check the machine hardware platform with uname?

To check the machine hardware platform using uname, run the following command:

Terminal window
uname -i

How to display the operating system name with uname?

You can display the operating system name using uname with the following command:

Terminal window
uname -o

How do I get the processor type information with uname?

To get the processor type information using uname, execute the following command:

Terminal window
uname -p

How to show all system information with uname?

To display all system information using uname, run the following command:

Terminal window
uname -a

Applications of the uname command

  • Display system information
  • Check the kernel version
  • Determine the operating system
  • Identify the machine hardware
  • Get information about the processor
  • Print out the node name
  • Check the release information