[Previous] [Contents] [Next]

uname

Return system name (POSIX)

Syntax:

uname [-amnrsv]

Options:

-a
Behave as if all the options -mnrsv were specified.
-b
Write the OS native word size (bits; 16 or 32), to standard output.
-m
Write the name of the hardware type on which the system is running.
-n
Write the name of this node.
-r
Write the current release level of the operating system (indicated by a number).
-s
Write the name of the operating system.
-v
Write the current version level of this release of the operating system (indicated by a letter).

Description:

The uname utility writes to standard output information on the name and release of the operating system being run. A portable application may use uname on any POSIX system to determine what operating system it's running under.

When no options are specified, uname writes the operating system name (QNX).

Examples:

Write the operating system name:

uname

Write a formatted string showing the name, release level, and version level of the operating system:

printf "OS: %s release %s version %s\n" `uname -srv`

Exit status:

0
Successful completion.
>0
An error occurred.

Caveats:

The sin utility provides more detailed information than uname, but sin is a QNX utility and will not be present on other systems.

See also:

sin


[Previous] [Contents] [Next]