uname
system informationLinux/Unix
The uname command is one of the most frequently used commands in Linux/Unix-like operating systems. uname Print system information
Quick Reference
Command Name:
uname
Category:
system information
Platform:
Linux/Unix
Basic Usage:
uname [options] [arguments]
Common Use Cases
Syntax
uname [OPTION]...
Options
Option | Description |
---|---|
-a, --all |
Print all information |
-s, --kernel-name |
Print the kernel name (default) |
-n, --nodename |
Print the network node hostname |
-r, --kernel-release |
Print the kernel release |
-v, --kernel-version |
Print the kernel version |
-m, --machine |
Print the machine hardware name |
-p, --processor |
Print the processor type (non-portable) |
-i, --hardware-platform |
Print the hardware platform (non-portable) |
-o, --operating-system |
Print the operating system |
--help |
Display help information and exit |
--version |
Output version information and exit |
Examples
How to Use These Examples
The examples below show common ways to use the uname
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
Basic Examples:
Print the kernel name
uname
Print all available information
uname -a
Print only the kernel version
uname -r
Print the machine hardware name
uname -m
Advanced Examples:
Print the operating system
uname -o
Print the processor type
uname -p