Linux and Unix uname command

Quick links

About uname
Syntax
Examples
Related commands
Linux and Unix main page

About uname

Print name of current system.

Syntax

uname [-a] [-i] [-m] [-n] [-p] [-r] [-s] [-v] [-X] [-S systemname]

-aPrint basic information currently available from the system.
-iPrint the name of the hardware implementation (platform).
-mPrint the machine hardware name (class). Use of this option is discouraged; use uname -p instead.
-nPrint the nodename (the nodename is the name by which the system is known to a communications network).
-pPrint the current host's ISA or processor type.
-rPrint the operating system release level.
-sPrint the name of the operating system. This is the default.
-vPrint the operating system version.
-XPrint expanded system information, one information
element per line, as expected by SCO Unix. The
displayed information includes:
  • system name, node, release, version, machine, and number of CPUs.
  • BusType, Serial, and Users (set to "unknown" in Solaris)
  • OEM# and Origin# (set to 0 and 1, respectively)
-S systemnameThe nodename may be changed by specifying a system name argument. The system name argument is restricted to SYS_NMLN characters. SYS_NMLN is an implementation specific value defined in <sys/utsname.h>. Only the super-user is allowed
this capability.

Examples

uname -arv

List the basic system information, OS release, and OS version as shown below.

SunOS hope 5.7 Generic_106541-08 sun4m sparc SUNW,SPARCstation-10

uname -p

Display the Linux platform.

Related commands

arch
isalist
sysinfo