Linux uuname command
The Linux uname command is used to display information about the current system.
uname is short for "UNIX name"; it provides a quick way to view system information.
The uname command can provide information such as the system name, version, and hardware architecture, helping users quickly understand the current operating system configuration.
Syntax
uname [选项]
The output and level of detail of the uname command vary with different options.
Parameter Description:
-a, --all: display all available information, including kernel name, node name, kernel version, machine type, processor type, hardware platform, and operating system.-s, --kernel-name: display the kernel name.-n, --nodename: display the network node name.-r, --kernel-release: display the kernel release version.-v, --kernel-version: display the kernel version.-m, --machine: display the computer's hardware architecture.-p, --processor: display the processor type.-i, --hardware-platform: display the hardware platform.-o, --operating-system: display the operating system name.
Example
1. Display all system information:
uname -a
Example output:
Linux myhostname 5.8.0-53-generic #60~18.04.1-Ubuntu SMP Tue Apr 13 20:37:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Explanation:
Linux: operating system namemyhostname: host name5.8.0-53-generic: kernel version#60~18.04.1-Ubuntu SMP Tue Apr 13 20:37:32 UTC 2021: kernel build information and timex86_64: machine architectureGNU/Linux: operating system type
2. View the kernel version:
uname -r
Example output:
5.8.0-53-generic
3. View the operating system name:
uname -s
Example output:
Linux
4. View the hardware architecture:
uname -m
Example output:
x86_64
Linux Command Reference