1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
|
'\" te
.\" Copyright 1989 AT&T
.\" Copyright (c) 2003, Sun Microsystems, Inc. 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.
.\" 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]
.TH uname 1 "17 Sep 2003" "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
.RS 18n
.rt
Prints basic information currently available from the system.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-i\fR\fR
.ad
.RS 18n
.rt
Prints the name of the platform.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-m\fR\fR
.ad
.RS 18n
.rt
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
.RS 18n
.rt
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
.RS 18n
.rt
Prints the current host's \fBISA\fR or processor type.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-r\fR\fR
.ad
.RS 18n
.rt
Prints the operating system release level.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-s\fR\fR
.ad
.RS 18n
.rt
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
.RS 18n
.rt
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<sys/utsname.h>\fR\&. Only the
super-user is allowed this capability. This change does not persist across
reboots of the system. Use \fBsys-unconfig\fR(1M) to change a host's name
permanently.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-v\fR\fR
.ad
.RS 18n
.rt
Prints the operating system version.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-X\fR \fR
.ad
.RS 18n
.rt
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 "unknown" 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:
.sp
.in +2
.nf
example% \fBuname \(misr\fR
.fi
.in -2
.sp
.sp
.LP
prints the operating system name and release level, separated by one SPACE
character.
.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.
.sp
.ne 2
.mk
.na
\fB\fBSYSV3\fR \fR
.ad
.RS 10n
.rt
This variable is used to override the default behavior of \fBuname\fR. This is
necessary to make it possible for some INTERACTIVE UNIX Systems and SCO UNIX
programs and scripts to work properly. Many scripts use \fBuname\fR to
determine the \fBSYSV3\fR type or the version of the \fBOS\fR to ensure
software is compatible with that \fBOS\fR. Setting \fBSYSV3\fR to an empty
string will make \fBuname\fR print the following default values:
.sp
.in +2
.nf
nodename nodename 3.2 2 i386
.fi
.in -2
.sp
The individual elements that \fBuname\fR displays can also be modified by
setting \fBSYSV3\fR in the following format:
.sp
.in +2
.nf
\fIos,sysname,node,rel,ver,mach\fR
.fi
.in -2
.sp
.sp
.ne 2
.mk
.na
\fB\fIos\fR \fR
.ad
.RS 12n
.rt
Operating system (IUS or SCO).
.RE
.sp
.ne 2
.mk
.na
\fB\fIsysname\fR \fR
.ad
.RS 12n
.rt
System name.
.RE
.sp
.ne 2
.mk
.na
\fB\fInode\fR \fR
.ad
.RS 12n
.rt
Nodename as displayed by the \fB-n\fR option.
.RE
.sp
.ne 2
.mk
.na
\fB\fIrel\fR \fR
.ad
.RS 12n
.rt
Release level as displayed by the \fB-r\fR option.
.RE
.sp
.ne 2
.mk
.na
\fB\fIver\fR \fR
.ad
.RS 12n
.rt
Version number as displayed by the \fB-v\fR option.
.RE
.sp
.ne 2
.mk
.na
\fB\fImach\fR \fR
.ad
.RS 12n
.rt
Machine name as displayed by \fB-m\fR option.
.RE
Do not put spaces between the elements. If an element is omitted, the current
system value will be used.
.RE
.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.mk
.na
\fB\fB0\fR \fR
.ad
.RS 7n
.rt
Successful completion.
.RE
.sp
.ne 2
.mk
.na
\fB\fB>0\fR \fR
.ad
.RS 7n
.rt
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
_
Interface StabilityStandard
.TE
.SH SEE ALSO
.sp
.LP
\fBarch\fR(1), \fBisalist\fR(1), \fBsys-unconfig\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 "sun4" 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.
|