Where to start First steps track · 15 stages
Linux Labs

uname — kernel and system information

3 min Ubuntu 24.04; GNU coreutils 9.4

Reports kernel identity, node name, and machine architecture, not the distribution release.

Cheat sheet

6 commands Printable version
  • uname -s kernel name
  • uname -r kernel release
  • uname -v build information
  • uname -m machine name
  • uname -n node name
  • uname -a combined output

Overview

uname reads information about the running kernel and system. With no options it behaves like -s. Identifying Ubuntu 24.04 requires distribution metadata rather than guessing from the kernel string.

The -r option reports the kernel release; -v reports its version/build string. Both can contain vendor information. Inside a VM, the output describes the guest environment and does not establish the physical server model.

Options

11

Select an individual option when you need one fact. The -a summary is readable, but splitting it on spaces is not a reliable parser: values may contain spaces, and unknown -p and -i fields are omitted.

The -p and -i options are non-portable. An unknown value indicates missing information, not a failed processor. Start with -m when checking the machine architecture.

Option What it does Example
-a --all Combine available fields for human inspection, not word-position parsing. uname -a
-s --kernel-name Report the kernel name; this is the default. uname -s
-n --nodename Report the network node name. uname -n
-r --kernel-release Report the running kernel release. uname -r
-v --kernel-version Report the kernel version/build string. uname -v
-m --machine Report the machine hardware name. uname -m
-p --processor Report processor type if known; non-portable. uname -p
-i --hardware-platform Report hardware platform if known; non-portable. uname -i
-o --operating-system Report the operating-system name, not an Ubuntu release. uname -o
--help Show help. uname --help
--version Report the coreutils version, not the kernel version. uname --version

Nothing found. Try a shorter query.

Recipes

3

Report the running kernel release

Record the actual result rather than copying a documentation example.

bash
uname -r

Separate kernel and distribution identity

Compare independent sources. os-release provides distribution release metadata.

bash
uname -r
cat /etc/os-release

Inspect machine architecture and node name

Architecture and node name are separate properties; neither is the user name.

bash
uname -m
uname -n

Troubleshooting

3

Processor information is unknown

The implementation did not provide this field. Use -m for the machine architecture.

bash
uname -m

The output has no Ubuntu release

uname does not report the distribution release.

bash
cat /etc/os-release

A parser for uname -a stopped working

Avoid word positions in the combined summary. Query the required field directly.

bash
uname -r
uname -m

Danger zone

The command does not change the system. Its output alone proves neither availability of a kernel feature nor absence of a vulnerability; those require separate configuration and package checks.

See also

Loading…