VMware ESXi and vSphere Cluster Management

Find Out More Information About Your Linux System with uname

Learn how to use uname to check Linux kernel, hostname, architecture, operating-system labels, and other system identity details.

The uname command helps you identify the Linux system currently running in a terminal. It can report the kernel name, hostname, kernel release, kernel version, machine architecture, and operating-system label.

uname means “Unix name.” It is a Unix-like utility for reporting selected information about the running operating system and machine. It is not a complete hardware inventory: it does not list all processors, memory, storage devices, USB devices, or installed software.

What uname Reports

The kernel is the core software layer that manages hardware and provides system services. Most uname fields describe the currently running kernel or the platform identity that the kernel exposes.

The running kernel is the kernel currently booted and in use. This matters because a newer kernel can be installed on disk without being the kernel currently running.

Basic uname Usage

The basic syntax is:

uname [OPTION]

With no option, uname prints the kernel name:

$ uname
Linux

Linux is the usual result on a Linux system. This is the kernel name, not the name of a specific Linux distribution such as Ubuntu, Fedora, or Debian.

uname Options and Reported Information

OptionLong optionInformation displayedTypical use
-s--kernel-nameKernel nameConfirm that the running kernel is Linux or another Unix-like kernel
-n--nodenameNetwork node nameFind the system hostname
-r--kernel-releaseKernel release identifierCheck the active kernel after an update or when diagnosing modules
-v--kernel-versionKernel build/version stringInspect build metadata and distribution-specific details
-m--machineMachine hardware nameCheck the architecture reported by the running kernel
-p--processorProcessor type, when availableRequest processor information; it may be unknown
-i--hardware-platformHardware platform, when availableRequest platform information; it may be unknown
-o--operating-systemOperating-system nameView a broad operating-system label such as GNU/Linux
-a--allAll principal uname fieldsCollect a compact overview for diagnostics or support

Display the Network Hostname

Use -n, or its long form --nodename, to display the system's network node name:

$ uname -n
workstation-01

The node name is usually the system's hostname, the name used to identify a computer to users, services, or other computers on a network. It is different from the operating-system name and from the machine architecture.

For comparison, hostname is another command that displays the hostname. In containers, cloud systems, or specially configured environments, the value can be set differently from the name you expect.

Display the Kernel Release

Use -r or --kernel-release to display the release identifier of the currently running kernel:

$ uname -r
6.8.0-52-generic

The kernel release is useful when checking whether an update is active or when diagnosing driver and kernel-module compatibility. A module built for one kernel release may not work with another.

Because this reports the booted kernel, a newly installed kernel does not appear here until you reboot into it.

Display the Kernel Version String

Use -v or --kernel-version to show the kernel's build-oriented version string:

$ uname -v
#52-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 14 10:22:31 UTC 2025

The -r result is the kernel release identifier. The -v result can include compilation information, build numbers, timestamps, and distribution-specific metadata. These are related fields, but they are not interchangeable.

Display the Machine Hardware Name and Architecture

Use -m or --machine to display the machine hardware name reported by the running kernel:

$ uname -m
x86_64

An architecture is a processor and instruction-set family. Common values include:

uname -m outputGeneral meaningArchitecture classImportant caveat
x86_6464-bit Intel- and AMD-compatible architecture64-bit x86Describes the running kernel's architecture, not necessarily every installed application
i68632-bit x86 architecture designation32-bit x86A 32-bit kernel can run on some processors capable of 64-bit operation
aarch6464-bit ARM architecture64-bit ARMIdentifies the kernel's reported machine architecture

uname -m reports the architecture of the running kernel. It is not always a definitive statement of every capability of the physical CPU, nor does it identify the architecture of all installed user-space applications. For more detailed CPU and CPU-mode information, use lscpu.

Display the Processor Type and Hardware Platform

The -p option, or --processor, requests the processor type:

$ uname -p
unknown

The -i option, or --hardware-platform, requests the hardware platform:

$ uname -i
unknown

These fields can be unknown on Linux systems because the kernel or platform does not provide a useful value. For most architecture checks, -m is the more commonly useful and portable option.

Display the Operating-System Name

Use -o or --operating-system to display a broad operating-system label:

$ uname -o
GNU/Linux

GNU/Linux commonly describes systems using the Linux kernel together with GNU userland tools. This label does not identify the exact Linux distribution or release. To find distribution information, use:

$ cat /etc/os-release

Display All Available uname Information

Use -a or --all for a quick overview:

$ uname -a
Linux workstation-01 6.8.0-52-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 14 10:22:31 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

The typical ordering is:

  1. Kernel name
  2. Node name or hostname
  3. Kernel release
  4. Kernel version
  5. Machine architecture
  6. Processor type
  7. Hardware platform
  8. Operating-system name

Some systems show empty or unknown values for processor type and hardware platform. Exact output also varies with the distribution, kernel version, hardware, virtual machines, and containers. Treat the ordering as the standard layout, not as a promise that every field will be equally informative.

Choose a Specific Option or Use -a

Use a specific option when a script, command, or support request needs one value:

$ uname -r
$ uname -m
$ uname -n

Use uname -a when you need a compact overview for troubleshooting. When requesting technical support, copy the output accurately, including punctuation, hyphens, underscores, and version numbers.

Using uname in a Shell Script

Command substitution places command output into a shell variable. This example stores the active kernel release and machine architecture, then prints them in a readable format:

kernel_release=$(uname -r)
machine_arch=$(uname -m)
printf 'Kernel: %s\nArchitecture: %s\n' "$kernel_release" "$machine_arch"

Keeping values separate is usually better than parsing the human-oriented output of uname -a.

Scope and Limitations

uname does not identify every aspect of a Linux computer. It does not directly provide:

  • The exact Linux distribution and release; use cat /etc/os-release.
  • The installed desktop environment.
  • The detailed CPU model, core layout, or CPU operating modes; use lscpu.
  • Memory size.
  • Storage devices and partitions.
  • USB device details; use lsusb.

It also reports the identity of the currently running kernel. If you install a newer kernel but continue running the old one, uname -r continues to show the old release until you reboot into the newer kernel.

Troubleshooting Common Results

The architecture seems inconsistent with the physical processor

If uname -m reports i686 on a computer believed to support 64-bit operation, the system may be running a 32-bit kernel. Run lscpu to inspect the reported architecture and available CPU modes.

A newly installed kernel does not appear

uname -r reports only the kernel currently booted, not every kernel installed on disk. Reboot into the intended kernel and run uname -r again.

Processor or platform fields say unknown

Unknown values are normal on some kernel and hardware combinations. Use uname -m for the commonly useful machine architecture and lscpu for more CPU detail.

uname -o does not show the distribution

The operating-system field is a broad label such as GNU/Linux, not a distribution identifier. Use cat /etc/os-release when you need the distribution name and release.

The hostname is unexpected

Cloud provisioning, containers, network-management tools, or host configuration may set the hostname. Compare the result with hostname and inspect the host-naming configuration. Also consider whether the command is running inside a container or virtual machine.

Quick Reference

Information neededRecommended commandWhy uname alone may not be sufficient
Kernel releaseuname -rThis is exactly the field needed; remember that it describes the running kernel
Hostnameuname -nIt usually matches the hostname, but container and network configuration can affect the value
Machine architectureuname -mIt describes the running kernel's architecture, not every CPU capability or application architecture
Linux distribution and releasecat /etc/os-releaseuname -o normally gives only a broad label such as GNU/Linux
Detailed CPU modellscpuuname -p may be unknown and does not provide a complete CPU report
USB deviceslsusbuname reports identity information, not a USB inventory

Key Points

  • uname means “Unix name” and reports selected identity details about the running system.
  • uname with no option usually prints Linux.
  • Use -n for the node name or hostname, -r for the active kernel release, and -v for the kernel build string.
  • Use -m for the running kernel's machine architecture, such as x86_64, i686, or aarch64.
  • Use -o for a broad operating-system label and -a for the principal fields together.
  • Use more specialized commands when you need distribution, CPU, memory, storage, or device details.

For a compact system identity report, start with uname -a. For reliable scripting or precise diagnosis, select the individual option you need, such as uname -r or uname -m.

Related reading: Find out more information about your system.