
uname Command in Linux
The uname command is a straightforward tool in Linux that provides important information about the system's kernel, operating system, and hardware. The name "uname" stands for "UNIX name". It's widely used by system administrators and developers for finding system details that help in solving problems, writing scripts, and monitoring system performance.
If you need to know your system's kernel version, machine architecture, or type of operating system, the uname command is a reliable choice. It quickly gives you the information you need.
Table of Contents
Here is a comprehensive guide to the options available with the uname command −
- What is uname Command in Linux?
- Syntax of uname Command
- uname Command Options
- Examples of uname Command in Linux
What is uname Command in Linux?
The uname command is an easy-to-use tool that comes with Linux systems. It gives you basic details about your computer's system. When you type uname without anything extra, it shows you the kernel's name. The kernel is the main part of the operating system that manages everything.
If you add extra options when using the uname command, you can get more information, like the version of the kernel, its release number, the hostname (this is like the computer's personal name), and the type of processor, along with other details.
The uname command is especially useful for making sure that the system is compatible, solving problems, and collecting necessary information for writing scripts or creating reports. Its straightforward nature and effectiveness make it a very important tool in the Linux world.
Syntax of uname Command
The basic syntax of the uname command is −
uname [OPTION]
Where [OPTION] specifies the type of information to retrieve. Multiple options can be combined to display comprehensive system details.
uname Command Options
Here are the commonly used options for the uname command −
Options | Description |
---|---|
-a, --all | Displays all available system details, including kernel name, hostname, kernel release, kernel version, machine hardware name, processor type, hardware platform, and operating system. |
-s, --kernel-name | Outputs the name of the kernel currently running on the system, typically showing "Linux" for most distributions. |
-n, --nodename | Prints the hostname or network node name of the machine, which uniquely identifies the system on a network. |
-r, --kernel-release | Displays the release version of the kernel. This is used to verify the specific kernel build installed. |
-v, --kernel-version | Shows detailed information about the kernel version, including its build date and time. |
-m, --machine | Outputs the hardware name of the machine, such as x86_64, indicating whether the system is 32-bit or 64-bit. |
-p, --processor | Prints the processor type used by the machine. |
-i, --hardware-platform | Displays the hardware platform for the system. |
-o, --operating-system | Outputs the name of the operating system running on the machine, often "GNU/Linux." |
--help | Provides a brief help message that lists all available options and explains their functionality. |
--version | Prints the current version of the uname command installed on the system. |
Examples of uname Command in Linux
Here are several practical use cases to demonstrate the versatility of the uname command −
- Displaying All System Information
- Checking the Kernel Name
- Finding the System Hostname
- Displaying Kernel Release Version
- Checking Detailed Kernel Version
- Identifying System Architecture
- Displaying Operating System Type
Displaying All System Information
To retrieve comprehensive system details, including kernel name, version, release, machine architecture, and operating system type, use −
uname -a

From the output,
- Linux is the Kernel name
- linux is the system hostname
- 6.14.0-15-generic is the Kernel release
- #15-Ubuntu SMP PREEMPT_DYNAMIC Sun Apr 6 15:05:05 UTC 2025 is the Kernel version and build info
- x86_64 x86_64 x86_64 is the Machine, processor, and hardware platform
- GNU/Linux is the Operating system name
Checking the Kernel Name
To determine the kernel type running on your system, execute −
uname -s

Finding the System Hostname
To identify the network node name or hostname −
uname -n

Displaying Kernel Release Version
To verify which kernel release is installed, run −
uname -r

Checking Detailed Kernel Version
For additional details, including the build date, use −
uname -v

Identifying System Architecture
To determine whether your system is 32-bit or 64-bit, execute −
uname -m

Displaying Operating System Type
To confirm the OS version running on your machine, use −
uname -o

Conclusion
The uname command is a helpful and straightforward tool. It gives important information about your system's kernel, hardware, and operating system environment. You can use it to check if things are compatible, fix issues, or add system details to scripts for automated tasks. This makes uname a must-have for Linux users.
If you learn how to use the uname command and its options, you can solve problems more easily, check your hardware, and make your system work better. The uname command gives you full control over diagnosing your system and keeping configurations updated.