What is the uname command in Linux?

Overview

Unix Name is abbreviated as uname. In Linux, uname is a helpful tool that displays hardware and software information about the current system.

Syntax


uname [option]

There are several options to list different types of information about the system.

Option Description
–help Shows the description and usage of the command
–version Shows the currently running version of the command
-n Displays the hostname of the network node
-p Displays the current processor type
-i Displays the hardware platform info
-o Displays the current operating system name
-a Displays all the info about the current system
-s Displays the Linux kernel name
-v Displays the Linux kernel version
-r Displays the Linux kernel release info
-m Displays the machine hardware name

Code

echo "uname:"
uname
echo "-------"
echo "uname -a:"
uname -a
echo "-------"
echo "uname -s:"
uname -s
echo "-------"
echo "uname -r:"
uname -r

Free Resources