uname command

Purpose

Writes to standard output the name of the operating system that you are using

Syntax

uname [ -a ] [-f ] [-F] [-l] [-L] [-m] [-M] [-n] [-p] [-r] [-s] [-u] [-x]

Description

The machine ID number contains 12 characters in the following digit format: xxyyyyyymmss. The xx positions indicate the system and is always 00. The yyyyyy positions contain the unique ID number for the entire system. The mm position represents the model ID. The ss position is the submodel number and is always 00. The model ID describes the ID of the CPU Planar, not the model of the System as a whole. You can use the uname -m command sometimes to determine which model you are using. The following list is not complete. Refer to hardware vendor supplied documentation for values in the range E0 - FF. Also note that not all machine types have a machine ID. Many new machines share a common machine ID of 4C.

Flags

Flag name Description
-a Displays all information specified with the -m, -n, -r, -s, and -v flags. Cannot be used with the -x flag If the -x flag is specified with the -a flag, the -x flag overrides it.
-F Displays a system identification string comprised of hexadecimal characters. This identification string is the same for all partitions on a particular system.
-f Similar to the F flag, except that the partition number is also used in the calculation of this string. The resulting identification string is unique for each partition on a particular system.
-l Displays the LAN network number.
-L Displays LPAR number and LPAR name. If LPAR does not exist, -1 is displayed for LPAR number and NULL for LPAR name.
-m Displays the machine ID number of the hardware running the system.
Note: The -m flag cannot be used to generate a unique machine identifier for partitions in an LPAR environment.
-M Displays the system model name. If the model name attribute does not exist, a null string is displayed.
-n Displays the name of the node. This may be a name the system is known by to a UUCP communications network.
-p Displays the architecture of the system processor.
-r Displays the release number of the operating system.
-s Displays the system name. This flag is on by default.
-u Displays the system ID number. If this attribute is not defined, the output is the same as the output displayed by uname -m.
-x Displays the information specified with the -a flag as well as the LAN network number, as specified by the -l flag.

Exit Status

The following exit values are returned:
Return code Description
0 Successful completion.
>0 An error occurred.

Examples

  1. To display the complete system name and version banner, enter:
    uname -a
    AIX vios_bat 3 5 00CD1B0E4C00
  2. To display the operating system name, enter:
    uname
    AIX

    Virtual I/O Server uname command calls the AIX® uname command. The flags are the same except that -S, -T, and -v are not allowed.




Last updated: Wed, November 18, 2020