Home·Terminal commands

uname

Processes and system

Usage

uname -a

Reports the kernel name, its release and the machine architecture; it will not tell you the distribution, for which you read /etc/os-release (or `sw_vers` on macOS), and `-o` is GNU only.

Common flags

FlagMeaning
-aEverything on one line.
-sKernel name: Linux or Darwin.
-rKernel release, the version number people usually mean.
-mMachine architecture: x86_64, aarch64, arm64.
-nNetwork node name, the same string hostname prints.
-oOperating system, GNU only. macOS has no -o.

Examples

uname -m

Tell an Apple Silicon or ARM server (arm64/aarch64) from an Intel one (x86_64).

uname -sr

Kernel name and release together.

cat /etc/os-release

What uname cannot tell you: the distribution and its version.

What is running and what is eating the machine. Identifying it comes before killing it.

How to read this

  • Square brackets [ ] mark a part you may leave out.
  • An ellipsis … means you can list more than one.
  • Flags are case-sensitive — in some commands -r and -R do different things.

Questions

Q. What does uname do?

Reports the kernel name, its release and the machine architecture; it will not tell you the distribution, for which you read /etc/os-release (or `sw_vers` on macOS), and `-o` is GNU only.

Q. How do I type it?

uname -a — square brackets mark the parts you can leave out.

Q. How many flags are worth knowing?

6 are listed here; the full set is in man uname. This command sits under Processes and system.

Related commands

man page: man uname