---
name: "uname"
section: "1"
platform: "macos"
package: "shell_cmds"
version: "329"
release: "macOS 26.5"
platforms: ["linux", "freebsd", "openbsd", "macos"]
url: "https://new.carta.tech/uname"
---

# uname(1)

display information about the system

## NAME

**uname** – display information about the system

## SYNOPSIS

**uname** \[**-amnoprsv**\]

## DESCRIPTION

The **uname** command writes the name of the operating system implementation to standard output. When options are specified, strings representing one or more system characteristics are written to standard output.

The options are as follows:

- **-a**

  Behave as though the options **-m**, **-n**, **-r**, **-s**, and **-v** were specified.

- **-m**

  Write the type of the current hardware platform to standard output. ([make(1)](/make/1.md) uses it to set the *MACHINE* variable.)

- **-n**

  Write the name of the system to standard output.

- **-o**

  This is a synonym for the **-s** option, for compatibility with other systems.

- **-p**

  Write the type of the machine processor architecture to standard output. ([make(1)](/make/1.md) uses it to set the *MACHINE\_ARCH* variable.)

- **-r**

  Write the current release level of the operating system to standard output.

- **-s**

  Write the name of the operating system implementation to standard output.

- **-v**

  Write the version level of this release of the operating system to standard output.

If the **-a** flag is specified, or multiple flags are specified, all output is written on a single line, separated by spaces.

## ENVIRONMENT

An environment variable composed of the string UNAME\_ followed by any flag to the **uname** utility (except for **-a**) will allow the corresponding data to be set to the contents of the environment variable.

The **-m**, **-n**, **-r**, **-s**, and **-v** variables additionally have long aliases that have historically been honored on MacOS, “UNAME\_MACHINE”, “UNAME\_NODENAME”, “UNAME\_RELEASE”, “UNAME\_SYSNAME”, and “UNAME\_VERSION” respectively. These names have a higher priority than their shorter counterparts described in the previous paragraph.

See [uname(3)](/uname/3.md) for more information.

## EXIT STATUS

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

## EXAMPLES

The hardware platform (**-m**) can be different from the machine's processor architecture (**-p**), e.g., on 64-bit PowerPC, **-m** would return *powerpc* and **-p** would return *powerpc64*.

## SEE ALSO

[hostname(1)](/hostname/1.md), [machine(1)](/machine/1.md), sw\_vers(1), [sysctl(3)](/sysctl/3.md), [uname(3)](/uname/3.md), [sysctl(8)](/sysctl/8.md)

## STANDARDS

The **uname** command is expected to conform to the IEEE Std 1003.2 (“POSIX.2”) specification.

## HISTORY

The **uname** command appeared in PWB UNIX 1.0, however 4.4BSD was the first Berkeley release with the **uname** command.

The **-K** and **-U** extension flags appeared in FreeBSD 10.0. The **-b** extension flag appeared in FreeBSD 13.0.
