'\" te .\" Copyright 1989 AT&T .\" Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved .\" 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 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. This notice shall appear on any product containing this material. .TH uname 1 "8 May 2012" "SunOS 5.11" "User Commands" .SH NAME uname \- print name of current system .SH SYNOPSIS .LP .nf \fBuname\fR [\fB-aimnprsvX\fR] .fi .LP .nf \fBuname\fR [\fB-S\fR \fIsystem_name\fR] .fi .SH DESCRIPTION .sp .LP The \fBuname\fR 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, \fBuname\fR prints the current operating system's name. The options print selected information returned by \fBuname\fR(2), \fBsysinfo\fR(2), or both. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .mk .na \fB\fB-a\fR\fR .ad .sp .6 .RS 4n Prints basic information currently available from the system. .RE .sp .ne 2 .mk .na \fB\fB-i\fR\fR .ad .sp .6 .RS 4n Prints the name of the platform. For machines of the \fBsun4v\fR architecture, the \fB-i\fR option returns: \fBsun4v\fR. Use \fBprtconf\fR(1M) with the \fB-b\fR option to obtain the platform name for a \fBsun4v\fR machine. .RE .sp .ne 2 .mk .na \fB\fB-m\fR\fR .ad .sp .6 .RS 4n Prints the machine hardware name (class). Use of this option is discouraged. Use \fBuname\fR \fB-p\fR instead. See NOTES section below. .RE .sp .ne 2 .mk .na \fB\fB-n\fR\fR .ad .sp .6 .RS 4n Prints the nodename (the nodename is the name by which the system is known to a communications network). .RE .sp .ne 2 .mk .na \fB\fB-p\fR\fR .ad .sp .6 .RS 4n Prints the current host's \fBISA\fR or processor type. .RE .sp .ne 2 .mk .na \fB\fB-r\fR\fR .ad .sp .6 .RS 4n Prints the operating system release level. .RE .sp .ne 2 .mk .na \fB\fB-s\fR\fR .ad .sp .6 .RS 4n Prints the name of the operating system. This is the default. .RE .sp .ne 2 .mk .na \fB\fB-S\fR \fIsystem_name\fR\fR .ad .sp .6 .RS 4n The nodename may be changed by specifying a system name argument. The system name argument is restricted to \fBSYS_NMLN\fR characters. \fBSYS_NMLN\fR is an implementation specific value defined in \fB\fR\&. Only the super-user is allowed this capability. This change does not persist across reboots of the system. .RE .sp .ne 2 .mk .na \fB\fB-v\fR\fR .ad .sp .6 .RS 4n Prints the operating system version. .RE .sp .ne 2 .mk .na \fB\fB-X\fR\fR .ad .sp .6 .RS 4n Prints expanded system information, one information element per line, as expected by SCO UNIX. The displayed information includes: .RS +4 .TP .ie t \(bu .el o system name, node, release, version, machine, and number of CPUs. .RE .RS +4 .TP .ie t \(bu .el o BusType, Serial, and Users (set to \fBunknown\fR in Solaris) .RE .RS +4 .TP .ie t \(bu .el o OEM# and Origin# (set to \fB0\fR and \fB1\fR, respectively) .RE .RE .SH EXAMPLES .LP \fBExample 1 \fRPrinting the OS Name and Release Level .sp .LP The following command prints the operating system name and release level, separated by one SPACE character: .sp .in +2 .nf example% \fBuname \(misr\fR .fi .in -2 .sp .SH ENVIRONMENT VARIABLES .sp .LP See \fBenviron\fR(5) for descriptions of the following environment variables that affect the execution of \fBuname\fR: \fBLANG\fR, \fBLC_ALL\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR. .SH EXIT STATUS .sp .LP The following exit values are returned: .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .sp .6 .RS 4n Successful completion. .RE .sp .ne 2 .mk .na \fB\fB>0\fR\fR .ad .sp .6 .RS 4n An error occurred. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitysystem/core-os _ Interface StabilityCommitted _ StandardSee \fBstandards\fR(5). .TE .SH SEE ALSO .sp .LP \fBarch\fR(1), \fBisalist\fR(1), \fBprtconf\fR(1M), \fBsysinfo\fR(2), \fBuname\fR(2), \fBnodename\fR(4), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5) .SH NOTES .sp .LP Independent software vendors (\fBISV\fRs) and others who need to determine detailed characteristics of the platform on which their software is either being installed or executed should use the \fBuname\fR command. .sp .LP To determine the operating system name and release level, use \fBuname\fR \fB-sr\fR. To determine only the operating system release level, use \fBuname\fR \fB-r\fR. Notice that operating system release levels are not guaranteed to be in \fIx.y\fR format (such as 5.3, 5.4, 5.5, and so forth); future releases could be in the \fIx.y.z\fR format (such as 5.3.1, 5.3.2, 5.4.1, and so forth). .sp .LP In SunOS 4.\fIx\fR releases, the \fBarch\fR(1) command was often used to obtain information similar to that obtained by using the \fBuname\fR command. The \fBarch\fR(1) command output \fBsun4\fR was often incorrectly interpreted to signify a SunOS SPARC system. If hardware platform information is desired, use \fBuname\fR \fB-sp\fR. .sp .LP The \fBarch\fR \fB-k\fR and \fBuname\fR \fB-m\fR commands return equivalent values; however, the use of either of these commands by third party programs is discouraged, as is the use of the \fBarch\fR command in general. To determine the machine's Instruction Set Architecture (\fBISA\fR or processor type), use \fBuname\fR with the \fB-p\fR option.