Linux online course

Find System Information in Linux with uname

Learn how to use Linux uname options to find the system name, hostname, kernel release, architecture, operating-system name, and combined system details.

The uname command reports selected identification details about the currently running system and kernel. It is useful when you need a quick description of the environment from a terminal.

The name uname comes from “Unix name.” It describes the running system and its kernel, not a complete inventory of hardware, installed software, or peripherals.

Run uname with no options

Open a terminal and type uname, then press Enter:

uname

A typical Linux system prints:

Linux

This is the kernel or system name. The result can differ across Unix-like systems, so another platform might print a different name.

Display the hostname with uname -n

A hostname is the name assigned to a computer for identification, especially on a network. The name may be configured by a system administrator, an operating-system installer, or a cloud-management system.

uname -n

The output is the machine's configured network node name, for example:

workstation-01

Use uname -n when the question is “What is this computer called?” It is different from the kernel name printed by plain uname.

Find the kernel release with uname -r

The kernel release is the release identifier for the kernel that is currently running. Display it with -r:

uname -r

Example output:

6.8.0-xx-generic

The exact value depends on the installed and currently booted kernel. This information is useful when checking hardware or software compatibility, reading support requirements, and writing bug reports.

Do not confuse the kernel release with the Linux distribution version. For example, a distribution can have its own release name and version while using a kernel with a separate release string. Use uname -r specifically for the running kernel; use distribution-specific tools or release files when you need the distribution version.

Check machine architecture with uname -m

The -m option reports the machine hardware name, commonly used as an architecture identifier:

uname -m

Common x86 results include:

  • x86_64: 64-bit x86 architecture.
  • i686: commonly a 32-bit x86 environment. Related older 32-bit x86 values include i386, i486, and i586.

The value identifies the architecture reported by the running kernel. It is not a complete CPU specification. In particular, it does not list the processor model, number of cores, instruction features, or every architecture supported by the hardware.

uname -m valueUsual meaningBitness guidance
x86_64x86-64 machine or kernel architectureNormally 64-bit
i686Older x86 architecture identifierCommonly 32-bit
aarch6464-bit ARM architectureNormally 64-bit
armv7lARMv7 architecture identifierCommonly 32-bit

Display the operating-system name with uname -o

GNU uname supports the -o option for printing the operating-system name:

uname -o

On many Linux systems using GNU userland tools, the output is:

GNU/Linux

This option is not universal. Non-GNU Unix-like systems can omit it, implement it differently, or return different text. Also, uname -o does not replace distribution-specific release information when you need a name such as a distribution family and version.

View all available uname fields with uname -a

Use -a to request a combined summary:

uname -a

A representative result might look like this:

Linux workstation-01 6.8.0-xx-generic #xx-Ubuntu SMP ... x86_64 x86_64 x86_64 GNU/Linux

Depending on the implementation, the line normally includes several of these fields:

  • Kernel name.
  • Hostname.
  • Kernel release.
  • Kernel version or build information.
  • Machine architecture.
  • Processor-related information.
  • Hardware-platform information.
  • Operating-system name, where supported.

Some fields can be unavailable, empty, or shown as unknown. The order and exact content can also vary between kernels and uname implementations. When a script or diagnostic report needs one precise value, prefer the corresponding single option.

Choose the right uname option

QuestionCommandInformation returnedTypical output or interpretation
What system or kernel name is running?unameKernel or system nameLinux
What is this computer's hostname?uname -nNetwork node hostnameA configured name such as workstation-01
Which kernel release is running?uname -rKernel release identifierA value such as 6.8.0-xx-generic
What machine architecture does the running kernel report?uname -mMachine hardware or kernel architecturex86_64 normally indicates 64-bit x86
What operating-system name does GNU uname report?uname -oOperating-system nameGNU/Linux on many GNU/Linux systems
How can I view a combined summary?uname -aAll available uname fieldsA single line containing several system-identification fields

Use one option when you need one answer. For example, use uname -r in a kernel compatibility check and uname -n when identifying a host in a network report. Use uname -a for a quick diagnostic summary that you can attach to a support request.

Understand what uname does not report

uname describes the running system call environment: the operating-system and kernel context in which programs run. It is not a comprehensive inventory of installed components.

  • It does not provide a full CPU model and feature list.
  • It does not list memory capacity, storage devices, USB devices, or PCI devices.
  • It does not always identify the Linux distribution and its release version.
  • uname -m describes the running kernel architecture, not necessarily the architecture of every installed application or process.

For deeper inspection, use specialized tools such as lscpu or /proc/cpuinfo for CPU details, /etc/os-release for distribution information, lsusb for USB devices, and lspci for PCI hardware.

Troubleshoot unexpected uname results

uname -o is invalid or behaves unexpectedly

Your system may use a uname implementation that does not support the GNU-specific -o behavior. Try uname -a, or review the locally supported options with uname --help and the local manual page. If you need the distribution name or version, use distribution-specific release information.

uname -m says x86_64, but an application appears to be 32-bit

uname -m describes the running kernel architecture. A particular executable or process can still be built for a different architecture. Treat the result as kernel and machine-architecture information, and use process- or executable-specific tools to investigate that application.

uname -r does not match the distribution version

Kernel release and distribution release are separate identifiers. Use uname -r for the kernel currently running, and use distribution release files or tools for the distribution version.

uname -a contains unfamiliar or unknown values

Fields vary by kernel and uname implementation. Use individual options to isolate the value you need, and consult the local command documentation for platform-specific behavior.

Quick practice

  1. Run uname and identify the system name.
  2. Run uname -n and identify the configured hostname.
  3. Run uname -r and record the running kernel release.
  4. Run uname -m and interpret the architecture value.
  5. Try uname -o, then compare its result with the operating-system field in uname -a.

For related command-line fundamentals, see Bourne Again Shell Bash, show the full path of shell commands, and the Linux file structure.