Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

uname - return system name

&pagelevel(4)&pagelevel

The uname command writes information related to the current operating system to standard output.


Syntax


uname[ option]

No option specified

The name of the operating system is output, e.g. POSIX-BC.

option

-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 and the processor type,
e.g. POSIX-BC D016ZE07 11.0A A45 BS2000 /390

-m

(machine type)

Outputs the machine hardware name,
e.g. BS2000.

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

-p

(processor type)

Outputs the processor family of the system that you are currently using,
e.g. /390.

-r

(release) 

Outputs the version number of the operating system,
e.g. 11.0A.

-s

(system) 

Outputs the name of the operating system. This is the name by which the operating system is known in the local installation,
e.g. POSIX-BC.

-v

(version)

Outputs the revision status of the POSIX system version,
e.g. A45.

Locale

The following environment variables affect the execution of uname:

LANG

Provide a default value for the internationalization variables that are unset or null. If LANG is unset of null, the corresponding value from the implementation-specific default locale will be used. If any of the internationalization variables contains an invalid setting, the utility will behave as if none of the variables had been defined.

LC_ALL

If set to a non-empty string value, override the values of all the other internationalization variables.

LC_CTYPE

Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single- as opposed to multi-byte characters in arguments and input files), the classification of characters as upper- to lower-case, and the mapping of characters from one case to the other.

LC_MESSAGES

Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.

NLSPATH

Determine the location of message catalogs for the processing of LC_MESSAGES.

Example

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

D016ZE07 11.0A

See also

uname() [4]