Vol. I · No. 46The command line sectionSat, 10 Oct 2026
Linux · system information

uname

which kernel is this

uname identifies the running kernel. uname -r gives the kernel version and -m the processor architecture — the two facts needed to pick the right download or driver.

uname describes the kernel; /etc/os-release describes the distribution.

Kernel version
uname -r
such as 6.8.0-45-generic
Architecture
uname -m
x86_64 or aarch64
Everything
uname -a
on one line
Distribution
Not shown
see /etc/os-release

At the terminal

Read the session first, then the notes: each numbered line in the output is answered by the note with the same number.

user@netflow — bashcoreutils
$ uname -a
1Linux netflow 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Sun Aug 30 12:02:04 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
2$ uname -r
6.8.0-45-generic
3$ uname -m
x86_64
4$ cat /etc/os-release | head -2
PRETTY_NAME="Ubuntu 24.04.1 LTS"
NAME="Ubuntu"
Illustrative session · names, sizes and dates are examples, and every address is from a documentation or private range
Reading the output

What the numbered lines are telling you

1
All of it at once

Kernel name, host name, kernel release, build number and date, and the hardware architecture.

2
The kernel release

The version that matters for drivers and for known vulnerabilities. Its modules live in /lib/modules under this exact name.

3
The architecture

x86_64 is 64-bit Intel or AMD; aarch64 is 64-bit ARM. Software must be downloaded for the matching one.

4
The distribution is recorded elsewhere

uname knows nothing about Ubuntu or Fedora. That is in /etc/os-release.

Switches

A switch changes how the command behaves. These are the ones used day to day; man uname lists the rest. Single-letter switches can usually be joined, so -l -a may be written -la.

-a
All: print every field on one line.
-r
The kernel release.
-m
The machine architecture: x86_64, aarch64.
-s
The kernel name. This is the default.
-n
The host name.
-v
The kernel build number and date.

Variations worth knowing

The same tool, pointed at a narrower question. These four cover most of what it is reached for day to day.

uname -sr

Kernel name and release together.

hostnamectl

Kernel, distribution, architecture and hardware model in one report.

lsb_release -a

The distribution’s name, release and codename.

cat /proc/version

The kernel version with the compiler that built it.

In cybersecurity

The kernel version is what decides which kernel vulnerabilities apply.

First thing an attacker checks

After getting a shell, uname -a is run to look up privilege-escalation exploits for that exact kernel. An old kernel is an invitation.

Updated is not the same as running

A kernel update takes effect only after a reboot. If uname -r shows an older version than the newest in /boot, the fix is not yet active.

Version strings in banners

Services that announce the operating system and kernel give that information to anyone who connects. Turn it off where you can.

Filed under

System information

Read alongside