uname(1)


uname -- print current system parameters

Synopsis

uname [-f]
uname parameter_name

uname -a
uname -Acdilmnprsv
uname -S hostname

Description

The uname command prints the current values of system parameters to standard output. This section discusses the first two command line formats for uname. The last three command lines above are supported for compatibility only and are discussed under Compatibility options.

uname with no arguments prints the value of the sysname parameter (see below), which is the same as the value reported by the legacy -s option.

uname -f prints all parameter names, one per line, each followed by an equal sign and the parameter's current value.

uname parameter_name prints only the value of parameter_name, with no parameter name or equal sign.

Parameters

The following table lists the possible values for each parameter_name argument.

parameter_name Values Legacy Option
architectureIA32 --  
bus_types comma list of:
EISA
ISA
MCA
PCIm.n
PnPm.n
--
hostname fully-qualified
hostname
-n
hw_provider Generic AT
Generic MP
Compaq Proliant
Compaq SystemPro
DG NUMALiiNE
oem product
...
-c
-p
hw_serial hardware serial# -i
kernel_stamp yy/mm/dd --
machine 486
Pentium
Pentium Pro
Pentium II
5x86
6x86
Am5x86
AMD-K5
AMD-K6
-m
num_cg #CGs --
num_cpu #CPUs --
os_base UNIX_SVR5 --
os_provider Caldera --
release 5 -r
srpc_domain -- -d
sysname OpenUNIX -s
user_limit #users
unlimited
-A
-l
version 8.0.1 -v

 parameter_name!Values!Legacy Option
 architectureIA32!!
 bus_types!T{
 comma list of:
 EISA
 ISA
 MCA
 PCIm.n
 PnPm.n
 T}!
 hostname!T{
 fully-qualified
 hostname
 T}!-n
 hw_provider!T{
 Generic AT
 Generic MP
 Compaq Proliant
 Compaq SystemPro
 DG NUMALiiNE
 oem product
 ...
 T}!T{
 -c
 -p
 T}
 hw_serial!hardware serial#!-i
 kernel_stamp!yy/mm/dd!
 machine!T{
 486
 Pentium
 Pentium Pro
 Pentium II
 5x86
 6x86
 Am5x86
 AMD-K5
 AMD-K6
 T}!-m
 num_cg!#CGs!
 num_cpu!#CPUs!
 os_base!UNIX_SVR5!
 os_provider!Caldera!
 release!5!-r
 srpc_domain!!-d
 sysname!OpenUNIX!-s
 user_limit!T{
 #users
 unlimited
 T}!T{
 -A
 -l
 T}
 version!T{
 8.0.1
 T}!-v

Use the setuname(1M) command to set the hostname or sysname parameter values.

Compatibility options


-a
Prints the values of the parameters printed by -s, -n, -r, -v, -m, -p, and the os_provider and os_base parameters (in that order). The hostname printed is not the fully-qualified hostname returned by uname hostname, but only that part of the hostname up to the first period (``.'').

-A
Prints the current user limit.

-c
Print the current host's processor type.

-d
Print the srpc_domain parameter.

-i
Print the current host's hardware serial number.

-l
Prints the current user limit.

-m
Print the machine hardware name.

-n
Print the hostname (formerly also known as the ``node name''); that is, the first part (up to the first "." character) of the hostname parameter.

-p
Print the current host's processor type.

-r
Print the operating system release.

-s
Print the name of this implementation of the operating system.

-v
Print the operating system version.

-S
Sets the system's hostname parameter to hostname. hostname is restricted to SYS_NMLN characters [see limits(4)]. Only a privileged user is allowed this capability.

Be aware that if you change hostname, other software may break unexpectedly; so, it is good practice not to change hostname once it is set. For example, networking software and application packages may save the hostname of your system at the time the package is installed. Therefore, each time you change the hostname, you need to locate all the files where it has been saved and change its value.

You will also need to notify the administrators of other machines on the network of your machine's new host name.

The LC_CTYPE environment variable determines the processing of the output data. [See LANG on environ(5).]

Files


/etc/nodename

/etc/systemid

/usr/lib/locale/locale/LC_MESSAGES/uxcore.abi
language-specific message file [See LANG on environ(5).]

Compatibility notes

The environment variable SCOMPAT allows you to override the default values (see ''Parameters'') for the sysname, release, and version parameters, to maintain compatibility with shell scripts and applications intended for earlier releases.

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=5:7.1.1:UnixWare
causes uname to respond as if the system were a UnixWare 7 Release 7.1.1 system.

The following table shows possible override values for each legacy option.

parameter_name legacy option UnixWare 7 value SCO OpenServer value SCO UnixWare 2.1.1 value
release -r 5 3.2 4.2MP
version -v 7
7.0.1
7.1.0
7.1.1
2 2.x
sysname -s UnixWare SCO_SV UNIX_SV
-- -X Release 5 3.2v5.0.x 4.2MP

 +---------------+---------------+------------------+----------------------+--------------------------+
 |parameter_name | legacy option | UnixWare 7 value | SCO OpenServer value | SCO UnixWare 2.1.1 value |
 +---------------+---------------+------------------+----------------------+--------------------------+
 |release        |      -r       |        5         |         3.2          |          4.2MP           |
 +---------------+---------------+------------------+----------------------+--------------------------+
 |version        |      -v       |      7           |          2           |           2.x            |
 |               |               |      7.0.1       |                      |                          |
 |               |               |      7.1.0       |                      |                          |
 |               |               |      7.1.1       |                      |                          |
 +---------------+---------------+------------------+----------------------+--------------------------+
 |sysname        |      -s       |     UnixWare     |        SCO_SV        |         UNIX_SV          |
 +---------------+---------------+------------------+----------------------+--------------------------+
 |               |  -X Release   |        5         |      3.2v5.0.x       |          4.2MP           |
 +---------------+---------------+------------------+----------------------+--------------------------+

References

confstr(3C), environ(5), limits(4), scompat(1), setuname(1M), sysinfo(2), uname(2)

``What system is this?'' in Porting, integration, and compatibility


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004