uname
Processes and system
Usage
uname -aReports 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
| Flag | Meaning |
|---|---|
| -a | Everything on one line. |
| -s | Kernel name: Linux or Darwin. |
| -r | Kernel release, the version number people usually mean. |
| -m | Machine architecture: x86_64, aarch64, arm64. |
| -n | Network node name, the same string hostname prints. |
| -o | Operating system, GNU only. macOS has no -o. |
Examples
uname -mTell an Apple Silicon or ARM server (arm64/aarch64) from an Intel one (x86_64).
uname -srKernel name and release together.
cat /etc/os-releaseWhat 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