System administration

Linux uname command

Print system information. The -a flag requests the available details.

Availability: Common Linux commands; shell built-ins and external implementations may differ by distribution.中文

Syntax

uname [OPTION]...

Examples

Print the available kernel and machine details.

uname -a

Show the kernel release string.

uname -r

Parameters, options and clauses

Option / clauseDescription
-a, --allPrint all available system information.
-s, --kernel-namePrint the kernel name.
-r, --kernel-releasePrint the kernel release.
-m, --machinePrint the hardware machine name.
-n, --nodenamePrint the network node hostname.
-o, --operating-systemPrint the operating-system name (where supported).
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory