uname1
Display information about the system
Usage
uname [-abiKmnoprsUv]
Overview
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
As-m,-n,-r,-s, and-vwere specified.-a,--allon Linux. -
-b -
Write the kernel's linker-generated build-id to standard output.
Not on Linux, OpenBSD or macOS. -
-i -
Write the kernel ident to standard output.
Not on OpenBSD or macOS. As-i,--hardware-platformon Linux. -
-K -
Write the FreeBSD version of the kernel.
Not on Linux, OpenBSD or macOS. -
-m -
Write the type of the current hardware platform to standard output. (make(1) uses it to set the MACHINE variable.)
As-m,--machineon Linux. -
-n -
Write the name of the system to standard output.
As-n,--nodenameon Linux. -
-o -
This is a synonym for the
Not on OpenBSD. As-soption, for compatibility with other systems.-o,--operating-systemon Linux. -
-p -
Write the type of the machine processor architecture to standard output. (make(1) uses it to set the MACHINE_ARCH variable.)
As-p,--processoron Linux. -
-r -
Write the current release level of the kernel to standard output. freebsd-version(1) can be used to print the release level of the userland.
As-r,--kernel-releaseon Linux. -
-s -
Write the name of the operating system implementation to standard output.
As-s,--kernel-nameon Linux. -
-U -
Write the FreeBSD version of the user environment.
Not on Linux, OpenBSD or macOS. -
-v -
Write the version level of this release of the operating system to standard output.
As-v,--kernel-versionon Linux.
If the -a flag is specified, or multiple flags are specified, all output is written on a single line, separated by spaces.
The -K and -U flags are intended to be used for fine grain differentiation of incremental FreeBSD development and user visible changes. Note that when both of these two options are specified, regardless of their order, the kernel version would be printed first, followed by the user environment version.
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. See uname(3) 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.
Releases
87 releases since FreeBSD 2.0.5-RELEASE; the text changed 47 times.
- 2.0.5–2.1.7.1
- 2.2.2
- 2.2.5
- 2.2.6
- 2.2.7–3.5.1
- 4.0–4.3
- 4.4–4.5
- 4.6–4.6.2
- 4.7
- 4.8–4.11
- 5.0–5.1
- 5.2–5.2.1
- 5.3–5.5
- 6.0–6.3
- 6.4
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1
- 8.2
- 8.3
- 8.4
- 9.0
- 9.1
- 9.2
- 9.3
- 10.0
- 10.1
- 10.2
- 10.3
- 10.4
- 11.0
- 11.1
- 11.2
- 11.3
- 11.4
- 12.0
- 12.1
- 12.2
- 12.3
- 12.4
- 13.0–13.1
- 13.2
- 13.3–14.5
- 15.0–16.0
-K since FreeBSD 9.3-RELEASE;
-U since FreeBSD 9.3-RELEASE;
-b since FreeBSD 13.0-RELEASE;
-i since FreeBSD 5.2-RELEASE;
-o since FreeBSD 8.2-RELEASE;
-p since FreeBSD 2.2.7-RELEASE.