2 .\" Copyright 1989 AT&T
3 .\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
4 .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
5 .\" 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
6 .\" http://www.opengroup.org/bookstore/.
7 .\" 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 Sun OS 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.
8 .\" This notice shall appear on any product containing this material.
9 .\" 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.
10 .\" 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.
11 .\" 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]
12 .TH UNAME 1 "Apr 14, 2016"
14 uname \- print name of current system
18 \fBuname\fR [\fB-aimnprsvX\fR]
23 \fBuname\fR [\fB-S\fR \fIsystem_name\fR]
28 The \fBuname\fR utility prints information about the current system on the
29 standard output. When options are specified, symbols representing one or more
30 system characteristics will be written to the standard output. If no options
31 are specified, \fBuname\fR prints the current operating system's name. The
32 options print selected information returned by \fBuname\fR(2),
33 \fBsysinfo\fR(2), or both.
36 The following options are supported:
43 Prints basic information currently available from the system.
52 Prints the name of the platform.
61 Prints the machine hardware name (class). Use of this option is discouraged.
62 Use \fBuname\fR \fB-p\fR instead. See NOTES section below.
71 Prints the nodename (the nodename is the name by which the system is known to a
72 communications network).
81 Prints the current host's \fBISA\fR or processor type.
90 Prints the operating system release level.
99 Prints the name of the operating system. This is the default.
105 \fB\fB-S\fR \fIsystem_name\fR\fR
108 The nodename may be changed by specifying a system name argument. The system
109 name argument is restricted to \fBSYS_NMLN\fR characters. \fBSYS_NMLN\fR is an
110 implementation specific value defined in \fB<sys/utsname.h>\fR\&. Only the
111 super-user is allowed this capability. This change does not persist across
112 reboots of the system. Use \fBsys-unconfig\fR(1M) to change a host's name
122 Prints the operating system version.
131 Prints expanded system information, one information element per line, as
132 expected by SCO UNIX. The displayed information includes:
137 system name, node, release, version, machine, and number of CPUs.
143 BusType, Serial, and Users (set to "unknown" in Solaris)
149 OEM# and Origin# (set to \fB0\fR and \fB1\fR, respectively)
155 \fBExample 1 \fRPrinting the OS name and release level
158 The following command:
163 example% \fBuname \(misr\fR
170 prints the operating system name and release level, separated by one SPACE
173 .SH ENVIRONMENT VARIABLES
175 See \fBenviron\fR(5) for descriptions of the following environment variables
176 that affect the execution of \fBuname\fR: \fBLANG\fR, \fBLC_ALL\fR,
177 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
181 The following exit values are returned:
188 Successful completion.
202 See \fBattributes\fR(5) for descriptions of the following attributes:
210 ATTRIBUTE TYPE ATTRIBUTE VALUE
212 Interface Stability Standard
217 \fBarch\fR(1), \fBisalist\fR(1), \fBsys-unconfig\fR(1M), \fBsysinfo\fR(2),
218 \fBuname\fR(2), \fBnodename\fR(4), \fBattributes\fR(5), \fBenviron\fR(5),
222 Independent software vendors (\fBISV\fRs) and others who need to determine
223 detailed characteristics of the platform on which their software is either
224 being installed or executed should use the \fBuname\fR command.
227 To determine the operating system name and release level, use \fBuname
228 \fR\fB-sr\fR. To determine only the operating system release level, use
229 \fBuname \fR\fB-r\fR. Notice that operating system release levels are not
230 guaranteed to be in \fIx.y\fR format (such as 5.3, 5.4, 5.5, and so forth);
231 future releases could be in the \fIx.y.z\fR format (such as 5.3.1, 5.3.2,
232 5.4.1, and so forth).
235 In SunOS 4.\fIx\fR releases, the \fBarch\fR(1) command was often used to obtain
236 information similar to that obtained by using the \fBuname\fR command. The
237 \fBarch\fR(1) command output "sun4" was often incorrectly interpreted to
238 signify a SunOS SPARC system. If hardware platform information is desired, use
239 \fBuname \fR\fB-sp\fR.
242 The \fBarch\fR \fB-k\fR and \fBuname\fR \fB-m\fR commands return equivalent
243 values; however, the use of either of these commands by third party programs is
244 discouraged, as is the use of the \fBarch\fR command in general. To determine
245 the machine's Instruction Set Architecture (\fBISA\fR or processor type), use
246 \fBuname\fR with the \fB-p\fR option.