1uname(1)                         User Commands                        uname(1)
2
3
4

NAME

6       uname - print name of current system
7

SYNOPSIS

9       uname [-aimnprsvX]
10
11
12       uname [-S system_name]
13
14

DESCRIPTION

16       The  uname  utility  prints information about the current system on the
17       standard output. When options are specified, symbols  representing  one
18       or  more system characteristics will be written to the standard output.
19       If no options are specified, uname prints the  current  operating  sys‐
20       tem's   name.  The  options  print  selected  information  returned  by
21       uname(2), sysinfo(2), or both.
22

OPTIONS

24       The following options are supported:
25
26       -a                Prints basic information currently available from the
27                         system.
28
29
30       -i                Prints the name of the platform.
31
32
33       -m                Prints the machine hardware name (class). Use of this
34                         option is discouraged.  Use  uname  -p  instead.  See
35                         NOTES section below.
36
37
38       -n                Prints  the  nodename  (the  nodename  is the name by
39                         which the system is known to  a  communications  net‐
40                         work).
41
42
43       -p                Prints the current host's ISA or processor type.
44
45
46       -r                Prints the operating system release level.
47
48
49       -s                Prints  the name of the operating system. This is the
50                         default.
51
52
53       -S system_name    The nodename may be changed by  specifying  a  system
54                         name argument. The system name argument is restricted
55                         to SYS_NMLN characters. SYS_NMLN is an implementation
56                         specific  value  defined in <sys/utsname.h>. Only the
57                         super-user is allowed this  capability.  This  change
58                         does  not  persist  across reboots of the system. Use
59                         sys-unconfig(1M) to change a host's name permanently.
60
61
62       -v                Prints the operating system version.
63
64
65       -X                Prints expanded system information,  one  information
66                         element  per  line, as expected by SCO UNIX. The dis‐
67                         played information includes:
68
69                             o      system  name,  node,   release,   version,
70                                    machine, and number of CPUs.
71
72                             o      BusType,   Serial,   and   Users  (set  to
73                                    "unknown" in Solaris)
74
75                             o      OEM# and Origin# (set to 0 and 1,  respec‐
76                                    tively)
77
78

EXAMPLES

80       Example 1 Printing the OS name and release level
81
82
83       The following command:
84
85
86         example% uname −sr
87
88
89
90
91       prints  the  operating  system name and release level, separated by one
92       SPACE character.
93
94

ENVIRONMENT VARIABLES

96       See environ(5) for descriptions of the following environment  variables
97       that  affect  the  execution  of uname: LANG, LC_ALL, LC_CTYPE, LC_MES‐
98       SAGES, and NLSPATH.
99
100       SYSV3     This variable is used to override  the  default  behavior  of
101                 uname.  This is necessary to make it possible for some INTER‐
102                 ACTIVE UNIX Systems and SCO UNIX programs and scripts to work
103                 properly.  Many scripts use uname to determine the SYSV3 type
104                 or the version of the OS to  ensure  software  is  compatible
105                 with  that  OS.  Setting  SYSV3  to an empty string will make
106                 uname print the following default values:
107
108                   nodename nodename 3.2 2 i386
109
110
111                 The individual elements that uname displays can also be modi‐
112                 fied by setting SYSV3 in the following format:
113
114                   os,sysname,node,rel,ver,mach
115
116
117
118                 os          Operating system (IUS or SCO).
119
120
121                 sysname     System name.
122
123
124                 node        Nodename as displayed by the -n option.
125
126
127                 rel         Release level as displayed by the -r option.
128
129
130                 ver         Version number as displayed by the -v option.
131
132
133                 mach        Machine name as displayed by -m option.
134
135                 Do  not  put  spaces  between the elements.  If an element is
136                 omitted, the current system value will be used.
137
138

EXIT STATUS

140       The following exit values are returned:
141
142       0      Successful completion.
143
144
145       >0     An error occurred.
146
147

ATTRIBUTES

149       See attributes(5) for descriptions of the following attributes:
150
151
152
153
154       ┌─────────────────────────────┬─────────────────────────────┐
155       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
156       ├─────────────────────────────┼─────────────────────────────┤
157       │Availability                 │SUNWcsu                      │
158       ├─────────────────────────────┼─────────────────────────────┤
159       │Interface Stability          │Standard                     │
160       └─────────────────────────────┴─────────────────────────────┘
161

SEE ALSO

163       arch(1),  isalist(1),  sys-unconfig(1M),  sysinfo(2),  uname(2),  node‐
164       name(4), attributes(5), environ(5), standards(5)
165

NOTES

167       Independent  software  vendors  (ISVs) and others who need to determine
168       detailed characteristics of the platform on  which  their  software  is
169       either being installed or executed should use the uname command.
170
171
172       To  determine  the  operating  system name and release level, use uname
173       -sr. To determine only the operating system release  level,  use  uname
174       -r.  Notice  that operating system release levels are not guaranteed to
175       be in x.y format (such as 5.3, 5.4, 5.5, and so forth); future releases
176       could  be  in  the  x.y.z  format  (such as 5.3.1, 5.3.2, 5.4.1, and so
177       forth).
178
179
180       In SunOS 4.x releases, the arch(1) command was  often  used  to  obtain
181       information  similar  to  that obtained by using the uname command. The
182       arch(1) command output "sun4" was often incorrectly interpreted to sig‐
183       nify a SunOS SPARC system. If hardware platform information is desired,
184       use uname -sp.
185
186
187       The arch -k and uname -m commands return  equivalent  values;  however,
188       the use of either of these commands by third party programs is discour‐
189       aged, as is the use of the arch command in general.  To  determine  the
190       machine's  Instruction  Set  Architecture  (ISA or processor type), use
191       uname with the -p option.
192
193
194
195SunOS 5.11                        17 Sep 2003                         uname(1)
Impressum