Home > Package & System Management > uname

uname: Display System Information

This command displays various information about the operating system and the system. You can check key system information such as kernel name, host name, kernel version, and hardware architecture.

Overview

uname is used to check basic information about the system, including the operating system, kernel, and hardware. It can display specific information or all information at once.

Key Information Types

The following are the main types of system information that can be obtained using the uname command:

  • Kernel name (e.g., Linux)
  • Network node hostname
  • Kernel release version
  • Kernel version
  • Hardware architecture (e.g., x86_64)
  • Operating system (e.g., GNU/Linux)

Key Options

The uname command allows you to select the system information to display through various options.

Information Display Options

Generated command:

Try combining the commands.

Description:

`uname` Executes the command.

Combine the above options to virtually execute commands with AI.

Usage Examples

Various usage examples of the uname command.

Display all system information

uname -a

Displays all system information, including kernel name, host name, release, version, machine hardware, processor, hardware platform, and operating system, on a single line.

Display only the kernel name

uname -s

Prints only the name of the currently used kernel.

Display kernel release version

uname -r

Prints the release version of the current kernel.

Display hardware architecture

uname -m

Prints the system's hardware architecture (e.g., x86_64).

Display operating system name

uname -o

Prints the name of the operating system.

Display kernel name and release version together

uname -sr

You can combine multiple options to selectively display only the desired information.

Tips & Notes

The uname command is useful for quickly checking basic system information and can be used to determine the system environment in scripts.

Meaning of Each Option

Each option of uname represents a specific aspect of the system. For example, `-m` indicates whether the system is 32-bit or 64-bit, and `-r` shows the exact version of the installed kernel. This information is important for system administration and software compatibility checks.

Scripting Usage

You can use the uname command in shell scripts to perform different actions based on the system environment.

  • It can be used with conditional statements when selecting different installation packages based on a specific OS or architecture.
  • It is useful for obtaining basic system information in system diagnostic or information gathering scripts.

Same category commands