The uname command is used to display basic system information from a Linux environment. It provides details about the operating system kernel, hardware architecture, and system configuration.
It is commonly used when checking the environment of a server during troubleshooting, deployment, or system verification.
Table of Contents
How the command works
The basic structure is:
uname [option]
When used without options, the command returns only the kernel name.
uname
Example output:
Linux
Displaying full system information
To display all available system details, use:
uname -a
This shows information such as:
- kernel name
- hostname
- kernel version
- system architecture
- operating system type
Common options
The uname command supports several options for retrieving specific information:
Kernel name
uname -s
Kernel release (version)
uname -r
Kernel version details
uname -v
System architecture
uname -m
Hostname
uname -n
Operating system type
uname -o
Practical use cases
The uname command is commonly used to:
- identify the server environment before deployment
- check kernel version for compatibility issues
- verify system architecture (e.g. 64-bit vs 32-bit)
- support debugging and system diagnostics
Practical implications
The command does not modify system data. It only reads and displays information about the running system.
The most commonly used variant is uname -a, which provides a complete overview in a single output.
Summary
The uname command provides quick access to system-level information such as kernel version and architecture. It is a standard tool used in SSH sessions for system identification and troubleshooting.