uname(1)

uname1

Print operating system name

Usage

uname [-amnprsv]

Overview

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:

-a

Behave as though all of the options -mnrsv were specified.

-m

Print the name of the hardware type. On OpenBSD, this is the kernel architecture as returned by machine(1).

-n

Print the network name of this machine. On OpenBSD, the same name can be printed with hostname(1).

-p

Print the application architecture as returned by arch(1) -s.

-r

Print the operating system release. On OpenBSD, the format is digit.digit.

-s

Print the operating system name. On OpenBSD, this is always “OpenBSD”.

-v

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.

Exit status

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

Releases

61 releases since OpenBSD 2.1; the text changed 15 times.

  1. 2.1–2.2
  2. 2.3–2.4
  3. 2.5
  4. 2.6
  5. 2.7–2.8
  6. 2.9–3.3
  7. 3.4
  8. 3.5–4.1
  9. 4.2–4.4
  10. 4.5–4.7
  11. 4.8
  12. 4.9–5.0
  13. 5.1–7.1
  14. 7.2–7.4
  15. 7.5
  16. 7.6–8.0

-p since OpenBSD 2.3.

-beta until OpenBSD 7.5; -current until OpenBSD 7.5; -stable until OpenBSD 7.5.

Standards

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

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

History

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

From man 8.0-current-20261101 in OpenBSD 8.0-current (2026-11-01). Parsed by carta from the page's mdoc source.