OpenBSD manual page server

Manual Page Search Parameters

UNAME(1) General Commands Manual UNAME(1)

unameprint operating system name

uname [-amnprsv]

The uname utility writes strings representing one or more system characteristics to the standard output. The formats and meanings of all these strings vary among operating systems.

The options are as follows:

Behave as though all of the options -mnrsv were specified.
Print the name of the hardware type. On OpenBSD, this is the kernel architecture as returned by machine(1).
Print the network name of this machine. On OpenBSD, the same name can be printed with hostname(1).
Print the application architecture as returned by arch(1) -s.
Print the operating system release. On OpenBSD, the format is digit.digit[-flavor].

The meaning of the -flavor suffix is as follows:

A development version preceding the digit.digit release.
no suffix
A public release, or a development version very closely preceding that release.
A branch based on the digit.digit release that only contains patches to fix very important bugs.
A development version coming after the digit.digit release. Some time before the subsequent release, the second digit is incremented and the -flavor switched to -beta.
Print the operating system name. On OpenBSD, this is always “OpenBSD”.
Print the operating system version. On OpenBSD, the format is SYSTEMNAME#buildnumber with the SYSTEMNAME mentioned in config(8).

If no options are specified, uname prints the operating system name as if the -s option had been specified.

If -a or more than one option is specified, OpenBSD prints the selected fields separated by single space characters in the following order: operating system name, network name, release, version, kernel architecture, application architecture.

The uname utility exits 0 on success, and >0 if an error occurs.

hostname(1), machine(1), uname(3)

The uname utility is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification.

The flag [-p] is an extension to that specification.

The uname command first appeared in PWB/UNIX 1.0 and was reimplemented for 4.4BSD.

October 9, 2023 OpenBSD-current