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 "Sep 17, 2003"
14 uname \- print name of current system
18 \fBuname\fR [\fB-aimnprsvX\fR]
23 \fBuname\fR [\fB-S\fR \fIsystem_name\fR]
29 The \fBuname\fR utility prints information about the current system on the
30 standard output. When options are specified, symbols representing one or more
31 system characteristics will be written to the standard output. If no options
32 are specified, \fBuname\fR prints the current operating system's name. The
33 options print selected information returned by \fBuname\fR(2),
34 \fBsysinfo\fR(2), or both.
38 The following options are supported:
45 Prints basic information currently available from the system.
54 Prints the name of the platform.
63 Prints the machine hardware name (class). Use of this option is discouraged.
64 Use \fBuname\fR \fB-p\fR instead. See NOTES section below.
73 Prints the nodename (the nodename is the name by which the system is known to a
74 communications network).
83 Prints the current host's \fBISA\fR or processor type.
92 Prints the operating system release level.
101 Prints the name of the operating system. This is the default.
107 \fB\fB-S\fR \fIsystem_name\fR\fR
110 The nodename may be changed by specifying a system name argument. The system
111 name argument is restricted to \fBSYS_NMLN\fR characters. \fBSYS_NMLN\fR is an
112 implementation specific value defined in \fB<sys/utsname.h>\fR\&. Only the
113 super-user is allowed this capability. This change does not persist across
114 reboots of the system. Use \fBsys-unconfig\fR(1M) to change a host's name
124 Prints the operating system version.
133 Prints expanded system information, one information element per line, as
134 expected by SCO UNIX. The displayed information includes:
139 system name, node, release, version, machine, and number of CPUs.
145 BusType, Serial, and Users (set to "unknown" in Solaris)
151 OEM# and Origin# (set to \fB0\fR and \fB1\fR, respectively)
157 \fBExample 1 \fRPrinting the OS name and release level
160 The following command:
165 example% \fBuname \(misr\fR
172 prints the operating system name and release level, separated by one SPACE
175 .SH ENVIRONMENT VARIABLES
178 See \fBenviron\fR(5) for descriptions of the following environment variables
179 that affect the execution of \fBuname\fR: \fBLANG\fR, \fBLC_ALL\fR,
180 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
187 This variable is used to override the default behavior of \fBuname\fR. This is
188 necessary to make it possible for some INTERACTIVE UNIX Systems and SCO UNIX
189 programs and scripts to work properly. Many scripts use \fBuname\fR to
190 determine the \fBSYSV3\fR type or the version of the \fBOS\fR to ensure
191 software is compatible with that \fBOS\fR. Setting \fBSYSV3\fR to an empty
192 string will make \fBuname\fR print the following default values:
196 nodename nodename 3.2 2 i386
201 The individual elements that \fBuname\fR displays can also be modified by
202 setting \fBSYSV3\fR in the following format:
206 \fIos,sysname,node,rel,ver,mach\fR
217 Operating system (IUS or SCO).
235 Nodename as displayed by the \fB-n\fR option.
244 Release level as displayed by the \fB-r\fR option.
253 Version number as displayed by the \fB-v\fR option.
262 Machine name as displayed by \fB-m\fR option.
265 Do not put spaces between the elements. If an element is omitted, the current
266 system value will be used.
272 The following exit values are returned:
279 Successful completion.
294 See \fBattributes\fR(5) for descriptions of the following attributes:
302 ATTRIBUTE TYPE ATTRIBUTE VALUE
304 Interface Stability Standard
310 \fBarch\fR(1), \fBisalist\fR(1), \fBsys-unconfig\fR(1M), \fBsysinfo\fR(2),
311 \fBuname\fR(2), \fBnodename\fR(4), \fBattributes\fR(5), \fBenviron\fR(5),
316 Independent software vendors (\fBISV\fRs) and others who need to determine
317 detailed characteristics of the platform on which their software is either
318 being installed or executed should use the \fBuname\fR command.
321 To determine the operating system name and release level, use \fBuname
322 \fR\fB-sr\fR. To determine only the operating system release level, use
323 \fBuname \fR\fB-r\fR. Notice that operating system release levels are not
324 guaranteed to be in \fIx.y\fR format (such as 5.3, 5.4, 5.5, and so forth);
325 future releases could be in the \fIx.y.z\fR format (such as 5.3.1, 5.3.2,
326 5.4.1, and so forth).
329 In SunOS 4.\fIx\fR releases, the \fBarch\fR(1) command was often used to obtain
330 information similar to that obtained by using the \fBuname\fR command. The
331 \fBarch\fR(1) command output "sun4" was often incorrectly interpreted to
332 signify a SunOS SPARC system. If hardware platform information is desired, use
333 \fBuname \fR\fB-sp\fR.
336 The \fBarch\fR \fB-k\fR and \fBuname\fR \fB-m\fR commands return equivalent
337 values; however, the use of either of these commands by third party programs is
338 discouraged, as is the use of the \fBarch\fR command in general. To determine
339 the machine's Instruction Set Architecture (\fBISA\fR or processor type), use
340 \fBuname\fR with the \fB-p\fR option.