uname(1) uname(1)
NAME
uname - output or set name of current system
SYNOPSIS
uname [option ...] Format 1
uname -S nodename Format 2
DESCRIPTION
The uname command writes information related to the current operating
system to standard output.
OPTIONS
Format 1: Output the system name
uname [option ...]
No option specified:
The name of the operating system is output, e.g. SINIX-Y.
-a (a - all) Outputs the following information: the name of the
operating system, the system's node name, the version number of
the operating system, the revision status of the operating system
version, the machine hardware name, the number of CPUs, the mega-
bytes of main memory, and the processor type, e.g. SINIX-Y utmost
5.43 B0032 RM600 6/256 R4000.
-M Outputs the number of CPUs and megabytes of memory, e.g. 6/256.
-m (m - machine type) Outputs the machine hardware name, e.g. RM600.
-n (n - node) Outputs the node name of the operating system. This is
the name by which a system is known in a communication network,
e.g. utmost.
-p (p - processor type) Outputs the processor family of the system
that you are currently using, e.g. R4000 for RISC-based systems.
-r (r - release) Outputs the version number of the operating system,
e.g. 5.43.
-s (s - system) Outputs the name of the operating system. This is
the name by which the operating system is known in the local in-
stallation, e.g. SINIX-Y.
-v (v - version) Outputs the revision status of the operating system
version, e.g. B0032.
Page 1 Reliant UNIX 5.44 Printed 11/98
uname(1) uname(1)
Format 2: Set and change the node name
uname -S nodename
Format 2 may be used by the system administrator only.
-S nodename
The node name of the system is changed to nodename.
The command uname -S outputs the following message:
uname can't change the node name in the whole software.
For more details refer to the uname manual page.
This means:
If the node name of the system is also the name of one or more
interfaces, you have to update the network configuration and re-
start all network services.
Note:
The node name of a system can also be changed using sysadm(1M),
menu item "system_setup".
LOCALE
The LCMESSAGES environment variable governs the language in which
message texts are displayed. If LCMESSAGES is undefined or is defined
as the null string, it defaults to the value of LANG. If LANG is like-
wise undefined or null, the system acts as if it were not internation-
alized.
The LCALL environment variable governs the entire locale. LCALL
takes precedence over all the other environment variables which affect
internationalization.
NOTES
A user wishing to maintain backwards compatibility with older releases
must set the environment variables correctly to ensure that uname sup-
plies the old name. There are various possibilities for doing this.
1) The /etc/default/uname file exists.
In this case, the $SNINAME environment variable is evaluated in
accordance with the /etc/default/uname file and can be set
locally by any user.
a) If this variable is set to SNINAME=comp (default), or to a
value other than "std", uname -s returns "SINIX-Y"or "SINIX-N".
b) If this variable is set to SNINAME=std, uname -s returns
"ReliantUNIX-Y" or "ReliantUNIX-N".
Page 2 Reliant UNIX 5.44 Printed 11/98
uname(1) uname(1)
2) The /etc/default/uname file does not exist.
In this case, the four environment variables OLDSYSNAME,
OLDRELEASE, OLDMACHINE, OLDVERSION can be set, in order to
change the default values displayed for the system, release,
machine, and version name (e. g. using /etc/profile). These vari-
ables can also be set locally by any user (e. g. by means of the
.profile file).
Default output corresponds to the output with SNINAME=comp.
EXAMPLES
Format 1: Example of using compatibility variables
1. You want to ensure that uname always returns the old name: Set
SNINAME=comp in the /etc/default/uname file.
2. You want to ensure that uname always returns the new name: Set
SNINAME=std in the /etc/default/uname file.
3. You want to ensure that in certain cases (users, applications)
uname returns output that differs from the setting in
/etc/default/uname: For example, for the old value set
SNINAME=comp
export SNINAME
in the application or user environment.
4. You want to replace all uname output with your own values: Delete
the /etc/default/uname file and use the OLD... environment vari-
ables for controlling your uname output.
Format 2: Example of querying the node name
You want to find out the node name of the operating system as well as
the version number of the operating system you are running:
$ uname -nr
utmost 5.43
FILES
/etc/default/uname
SEE ALSO
sysinfo(2), uname(2).
Page 3 Reliant UNIX 5.44 Printed 11/98