UNAME(1) User Commands UNAME(1)

NAME


uname - print name of current system

SYNOPSIS


uname [-aimnoprsvX]
uname -S system_name

DESCRIPTION


The uname utility prints information about the current system on the
standard output. When options are specified, symbols representing one or
more system characteristics will be written to the standard output. If no
options are specified, uname prints the current operating system's name.
The options print selected information returned by uname(2), sysinfo(2), or
both.

OPTIONS


The following options are supported:

-a Prints basic information currently available from the system.

-i Prints the name of the platform.

-m Prints the machine hardware name (class). Use of this option is
discouraged. Use uname -p instead. See NOTES section below.

-n Prints the nodename (the nodename is the name by which the system
is known to a communications network).

-o Prints the name of the kernel/OS.

-p Prints the current host's ISA or processor type.

-r Prints the operating system release level.

-s Prints the name of the operating system. This is the default.

-S system_name
The 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.
This change does not persist across reboots of the system. See
nodename(5) for details of how to change a host's name permanently.

-v Prints the operating system version.

-X Prints expanded system information, one information element per
line, as expected by SCO UNIX. The displayed information includes:

+o system name, node, release, version, machine, and number of
CPUs.

+o BusType, Serial, and Users (set to "unknown" in Solaris)

+o OEM# and Origin# (set to 0 and 1, respectively)

EXIT STATUS


The uname utility exits 0 on success, and >0 if an error occurs.

EXAMPLES


Example 1 Printing the OS name and release level
The following command:

$ uname -sr

...prints the operating system name and release level, separated by
one SPACE character.

ENVIRONMENT VARIABLES


See environ(7) for descriptions of the following environment variables that
affect the execution of uname: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and
NLSPATH.

INTERFACE STABILITY


Standard

SEE ALSO


arch(1), isalist(1), sysinfo(2), uname(2), nodename(5), attributes(7),
environ(7), standards(7)

NOTES


Independent software vendors (ISVs) and others who need to determine
detailed characteristics of the platform on which their software is either
being installed or executed should use the uname command.

To determine the operating system name and release level, use uname -sr.
To determine only the operating system release level, use uname -r. Notice
that operating system release levels are not guaranteed to be in x.y format
(such as 5.3, 5.4, 5.5, and so forth); but could be in the x.y.z format
(such as 5.5.1).

In SunOS 4.x releases, the arch(1) command was often used to obtain
information similar to that obtained by using the uname command. The
arch(1) command output `sun4' was often incorrectly interpreted to signify
a SunOS SPARC system. If hardware platform information is desired, use
uname -sp.

The arch -k and uname -m commands return equivalent values; however, the
use of either of these commands by third party programs is discouraged, as
is the use of the arch command in general. To determine the machine's
Instruction Set Architecture (ISA or processor type), use uname with the -p
option.

illumos February 9, 2018 illumos