uname: show basic system information

Report system information such as kernel name, hostname, kernel release and version, and the hardware and CPU architecture.

Typical usage: information gathering, system administration

Introduction into uname

The uname command provides basic information about a Linux system and the related hardware. It can show the architecture of the machine and the processor.

Installation

When uname is not installed by default, it can be added to the system using the relevant software package.

Package information for uname

Operating systemPackage nameInstallation
AlmaLinuxcoreutils
dnf install coreutils
Arch Linuxcoreutils
pacman -S coreutils
Debiancoreutils
apt install coreutils
Fedoracoreutils
dnf install coreutils
Red Hat Enterprise Linuxcoreutils
dnf install coreutils
Rocky Linuxcoreutils
dnf install coreutils
openSUSEcoreutils
zypper install coreutils
Ubuntucoreutils
apt install coreutils

Your Linux distribution using a different package? Share your feedback.

Usage

Available options

Long optionShort optionDescription
--all-aShow all details, such as kernel name, hostname, kernel release and version, and CPU architecture
--hardware-platform-iShow hardware platform
--kernel-name-sShow kernel name
--kernel-release-rShow kernel release
--kernel-version-vShow kernel version, usually information about when the kernel was built
--machine-mShow machine hardware name, often the same as hardware platform and CPU architecture
--nodename-nShow hostname of system
--operating-system-oShow operating system
--processor-pShow CPU architecture, if available

Missing an option in this overview? Share your feedback.

Examples using uname

Show all available information

uname -a

Example output of uname:

# uname -a
Linux debian-test 6.1.0-28-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 (2024-11-22) x86_64 GNU/Linux

Frequently Asked Questions

What is the uname command and its purpose?

The uname command is a command-line tool on Linux to show basic system information.

Which package provides the uname command?

The command uname is provided by the coreutils package.

Relevant articles using the uname command

The following articles include an example on how to use uname and might be worth further exploring.