uname(C)
uname --
print the name of the operating system
Syntax
uname [ -aAmnrsvX ]
uname [ -S node_name ]
Description
The uname command prints the name of the operating system
to the standard output.
The various options to uname return selected information
that is available with the
uname(S-osr5)
system call:
-a-
Print all the information corresponding to the options -s,
-n, -r, -v, and -m.
-A-
Print the license field (activation state) information.
-m-
Print the machine hardware name.
-n-
Print the machine's node name; the name by which it is known to a
communications network.
-r-
Print the operating system release.
The value returned can be overridden by the SCOMPAT environment
variable, described below.
-s-
Print the operating system name (the default action of
uname).
The value returned can be overridden by the SCOMPAT and UNAME_OLD environment
variables, described below.
-S node_name-
Change the machine's node name to node_name. Note that
only root is allowed to change the node name. This option
does not change the operating system name.
The format of node_name is restricted to 8 characters from
the set of lowercase letters, numeric digits, dash ``-'', and
underscore ``_''; the name may not begin with a digit.
-v-
Print the operating system version number.
The value returned can be overridden by the SCOMPAT and UNAME_OLD environment
variables, described below.
-X-
Print information about system name, node name, operating system
release number, kernel ID, processor type, bus type,
serial number, number of users license (2-user, 8-user or
unlimited), OEM number, origin number, and number of
CPUs.
Compatibility notes
The environment variable SCOMPAT allows you to override the
default values for the system name, release,
and version parameters, to maintain compatibility
with shell scripts and applications intended for earlier releases.
This override applies to the current process and its children only,
and affects the return of the uname command only (and not,
for example, the uname system call).
The syntax of the SCOMPAT variable is:
release:version[:sysname[:Xrelease]]
The first three values override the corresponding uname
parameter_name.
The final parameter (Xrelease), is intended for
compatibility with scripts using the undocumented
legacy -X Release option.
For example, setting SCOMPAT as follows:
export SCOMPAT=4:5.0.7:SCO_SV
causes uname to respond as if the system were a &harveywest;
system.
To change these values for the whole system, as well as to change the
return values of uname(), confstr(),
and sysinfo() for compatibility purposes, see
chsysinfo(ADM).
Older releases of SCO OpenServer also incorrectly displayed the
node name in place of the system name, and always displayed a version
number of "2". Older application scripts may depend on this
incorrect behavior. If the environment variable
UNAME_OLD exists, uname displays the system name as the node name
and the operating system version as "2".
Warning
Previous releases of uname and
uname(S-osr5)
returned the machine's node name if no command line option was
specified. This may cause existing application scripts and binaries
to fail under this release.
UnixWare compatibility notes
When running ACP on UnixWare systems,
set OSRCMDS=on to use
the SCO OpenServer version of the <uname> command.
This provides the expected behaviors
for SCO OpenServer applications.
The SCO OpenServer version of this command
is also provided on Open UNIX 8 systems under the OSP feature
See the
Running SCO OpenServer Applications
topic in the UnixWare documentation set.
See also
uname(S-osr5)
Standards conformance
uname is conformant with:
ISO/IEC DIS 99452:1992, Information technology Portable Operating System Interface (POSIX) Part 2: Shell and Utilities (IEEE Std 1003.21992);
AT&T SVID Issue 2;
X/Open CAE Specification, Commands and Utilities, Issue 4, 1992.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005