.\" .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for .\" permission to reproduce portions of its copyrighted documentation. .\" Original documentation from The Open Group can be obtained online at .\" http://www.opengroup.org/bookstore/. .\" .\" The Institute of Electrical and Electronics Engineers and The Open .\" Group, have given us permission to reprint portions of their .\" documentation. .\" .\" In the following statement, the phrase ``this text'' refers to portions .\" of the system documentation. .\" .\" Portions of this text are reprinted and reproduced in electronic form .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition, .\" Standard for Information Technology -- Portable Operating System .\" Interface (POSIX), The Open Group Base Specifications Issue 6, .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics .\" Engineers, Inc and The Open Group. In the event of any discrepancy .\" between these versions and the original IEEE and The Open Group .\" Standard, the original IEEE and The Open Group Standard is the referee .\" document. The original Standard can be obtained online at .\" http://www.opengroup.org/unix/online.html. .\" .\" This notice shall appear on any product containing this material. .\" .\" The contents of this file are subject to the terms of the .\" Common Development and Distribution License (the "License"). .\" You may not use this file except in compliance with the License. .\" .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE .\" or http://www.opensolaris.org/os/licensing. .\" See the License for the specific language governing permissions .\" and limitations under the License. .\" .\" When distributing Covered Code, include this CDDL HEADER in each .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. .\" If applicable, add the following below this CDDL HEADER, with the .\" fields enclosed by brackets "[]" replaced with your own identifying .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" .\" Copyright 1989 AT&T .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved .\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved .\" Copyright 2018 Nexenta Systems, Inc. .\" .Dd February 9, 2018 .Dt UNAME 1 .Os .Sh NAME .Nm uname .Nd print name of current system .Sh SYNOPSIS .Nm .Op Fl aimnoprsvX .Nm .Fl S Ar system_name .Sh DESCRIPTION The .Nm 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, .Nm prints the current operating system's name. The options print selected information returned by .Xr uname 2 , .Xr sysinfo 2 , or both. .Sh OPTIONS The following options are supported: .Bl -tag -width Ds .It Fl a Prints basic information currently available from the system. .It Fl i Prints the name of the platform. .It Fl m Prints the machine hardware name (class). Use of this option is discouraged. Use .Nm Fl p instead. See .Sx NOTES section below. .It Fl n Prints the nodename (the nodename is the name by which the system is known to a communications network). .It Fl o Prints the name of the kernel/OS. .It Fl p Prints the current host's ISA or processor type. .It Fl r Prints the operating system release level. .It Fl s Prints the name of the operating system. This is the default. .It Fl S Ar system_name The nodename may be changed by specifying a system name argument. The system name argument is restricted to .Dv SYS_NMLN characters. .Dv SYS_NMLN is an implementation specific value defined in .In sys/utsname.h . Only the super-user is allowed this capability. This change does not persist across reboots of the system. See .Xr nodename 5 for details of how to change a host's name permanently. .It Fl v Prints the operating system version. .It Fl X Prints expanded system information, one information element per line, as expected by SCO UNIX. The displayed information includes: .Bl -bullet .It system name, node, release, version, machine, and number of CPUs. .It BusType, Serial, and Users (set to "unknown" in Solaris) .It OEM# and Origin# (set to 0 and 1, respectively) .El .El .Sh EXIT STATUS .Ex -std .Sh EXAMPLES .Bl -tag -width Ds .It Sy Example 1 No Printing the OS name and release level The following command: .Bd -literal $ uname -sr .Ed .Pp \&...prints the operating system name and release level, separated by one SPACE character. .El .Sh ENVIRONMENT VARIABLES See .Xr environ 7 for descriptions of the following environment variables that affect the execution of .Nm : .Ev LANG , LC_ALL , LC_CTYPE , LC_MESSAGES , and .Ev NLSPATH . .Sh INTERFACE STABILITY .Sy Standard .Sh SEE ALSO .Xr arch 1 , .Xr isalist 1 , .Xr sysinfo 2 , .Xr uname 2 , .Xr nodename 5 , .Xr attributes 7 , .Xr environ 7 , .Xr standards 7 .Sh 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 .Nm command. .Pp To determine the operating system name and release level, use .Nm Fl sr . To determine only the operating system release level, use .Nm Fl r . Notice that operating system release levels are not guaranteed to be in .Em x.y format (such as 5.3, 5.4, 5.5, and so forth); but could be in the .Em x.y.z format (such as 5.5.1). .Pp In SunOS 4.x releases, the .Xr arch 1 command was often used to obtain information similar to that obtained by using the .Nm command. The .Xr arch 1 command output .Ql sun4 was often incorrectly interpreted to signify a SunOS SPARC system. If hardware platform information is desired, use .Nm Fl sp . .Pp The .Nm arch Fl k and .Nm Fl 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 .Nm arch command in general. To determine the machine's Instruction Set Architecture (ISA or processor type), use .Nm with the .Fl p option.