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.
unameparameter_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.
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
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 unameparameter_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.