6001 strcat(9f) needs a manpage
[unleashed.git] / usr / src / man / man1 / uname.1
blobb6b57d57421d17ba69bffd56b897dd3a67209af1
1 '\" te
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"
13 .SH NAME
14 uname \- print name of current system
15 .SH SYNOPSIS
16 .LP
17 .nf
18 \fBuname\fR [\fB-aimnprsvX\fR]
19 .fi
21 .LP
22 .nf
23 \fBuname\fR [\fB-S\fR \fIsystem_name\fR]
24 .fi
26 .SH DESCRIPTION
27 .sp
28 .LP
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.
35 .SH OPTIONS
36 .sp
37 .LP
38 The following options are supported:
39 .sp
40 .ne 2
41 .na
42 \fB\fB-a\fR\fR
43 .ad
44 .RS 18n
45 Prints basic information currently available from the system.
46 .RE
48 .sp
49 .ne 2
50 .na
51 \fB\fB-i\fR\fR
52 .ad
53 .RS 18n
54 Prints the name of the platform.
55 .RE
57 .sp
58 .ne 2
59 .na
60 \fB\fB-m\fR\fR
61 .ad
62 .RS 18n
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.
65 .RE
67 .sp
68 .ne 2
69 .na
70 \fB\fB-n\fR\fR
71 .ad
72 .RS 18n
73 Prints the nodename (the nodename is the name by which the system is known to a
74 communications network).
75 .RE
77 .sp
78 .ne 2
79 .na
80 \fB\fB-p\fR\fR
81 .ad
82 .RS 18n
83 Prints the current host's \fBISA\fR or processor type.
84 .RE
86 .sp
87 .ne 2
88 .na
89 \fB\fB-r\fR\fR
90 .ad
91 .RS 18n
92 Prints the operating system release level.
93 .RE
95 .sp
96 .ne 2
97 .na
98 \fB\fB-s\fR\fR
99 .ad
100 .RS 18n
101 Prints the name of the operating system. This is the default.
105 .ne 2
107 \fB\fB-S\fR \fIsystem_name\fR\fR
109 .RS 18n
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
115 permanently.
119 .ne 2
121 \fB\fB-v\fR\fR
123 .RS 18n
124 Prints the operating system version.
128 .ne 2
130 \fB\fB-X\fR \fR
132 .RS 18n
133 Prints expanded system information, one information element per line, as
134 expected by SCO UNIX. The displayed information includes:
135 .RS +4
137 .ie t \(bu
138 .el o
139 system name, node, release, version, machine, and number of CPUs.
141 .RS +4
143 .ie t \(bu
144 .el o
145 BusType, Serial, and Users (set to "unknown" in Solaris)
147 .RS +4
149 .ie t \(bu
150 .el o
151 OEM# and Origin# (set to \fB0\fR and \fB1\fR, respectively)
155 .SH EXAMPLES
157 \fBExample 1 \fRPrinting the OS name and release level
160 The following command:
163 .in +2
165 example% \fBuname \(misr\fR
167 .in -2
172 prints the operating system name and release level, separated by one SPACE
173 character.
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.
182 .ne 2
184 \fB\fBSYSV3\fR \fR
186 .RS 10n
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:
194 .in +2
196 nodename nodename 3.2 2 i386
198 .in -2
201 The individual elements that \fBuname\fR displays can also be modified by
202 setting \fBSYSV3\fR in the following format:
204 .in +2
206 \fIos,sysname,node,rel,ver,mach\fR
208 .in -2
212 .ne 2
214 \fB\fIos\fR \fR
216 .RS 12n
217 Operating system (IUS or SCO).
221 .ne 2
223 \fB\fIsysname\fR \fR
225 .RS 12n
226 System name.
230 .ne 2
232 \fB\fInode\fR \fR
234 .RS 12n
235 Nodename as displayed by the \fB-n\fR option.
239 .ne 2
241 \fB\fIrel\fR \fR
243 .RS 12n
244 Release level as displayed by the \fB-r\fR option.
248 .ne 2
250 \fB\fIver\fR \fR
252 .RS 12n
253 Version number as displayed by the \fB-v\fR option.
257 .ne 2
259 \fB\fImach\fR \fR
261 .RS 12n
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.
269 .SH EXIT STATUS
272 The following exit values are returned:
274 .ne 2
276 \fB\fB0\fR \fR
278 .RS 7n
279 Successful completion.
283 .ne 2
285 \fB\fB>0\fR \fR
287 .RS 7n
288 An error occurred.
291 .SH ATTRIBUTES
294 See \fBattributes\fR(5) for descriptions of the following attributes:
299 box;
300 c | c
301 l | l .
302 ATTRIBUTE TYPE  ATTRIBUTE VALUE
304 Interface Stability     Standard
307 .SH SEE ALSO
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),
312 \fBstandards\fR(5)
313 .SH NOTES
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.