Install guides often ask “which kernel are you running?”, and Docker, WireGuard, ZFS and many drivers have kernel requirements. uname answers in one command. This guide also covers how to tell whether a kernel update is waiting for a reboot.

The commands

uname -r        # kernel release: 6.8.0-88-generic
uname -m        # architecture: x86_64 (or aarch64 for ARM)
uname -a        # everything
Linux web1 6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC … x86_64 x86_64 x86_64 GNU/Linux

Fields in uname -a: kernel name, hostname, release, build version and date, machine architecture, and operating system.

Other options: -s (kernel name), -n (hostname), -v (build string) and -o (OS).

Reading the version string

6.8.0-88-generic:

  • 6.8 — upstream kernel version (major.minor).
  • 0 — patch level (often 0 in distribution kernels, which backport fixes instead).
  • 88 — the distribution’s build or ABI number. It changes with each security update.
  • generic — the flavour (generic, lowlatency, aws, kvm…).

On RHEL-family systems: 5.14.0-503.14.1.el9_5.x86_64. The base version is 5.14, followed by Red Hat’s build number. Enterprise kernels backport many newer features, so the base number understates what they support.

Kernel vs distribution version

uname shows the kernel, not the distribution. For “Ubuntu 24.04” or “Debian 12”:

cat /etc/os-release
hostnamectl

See check Linux version.

Architecture matters

uname -m tells you which binaries to download:

Output Download
x86_64 amd64 / x86_64 / x64
aarch64 arm64
armv7l armhf / armv7

dpkg --print-architecture gives the Debian name (amd64 or arm64) directly.

Installed vs running kernel: is a reboot pending?

Kernel updates install a new kernel, but the old one keeps running until you reboot. Security fixes in the new kernel aren’t active yet.

uname -r                                  # running
ls /boot/vmlinuz-*                        # installed
dpkg -l 'linux-image-*' | grep ^ii        # Debian/Ubuntu
rpm -q kernel                             # RHEL family

If the newest installed version is higher than uname -r, a reboot is due.

Ubuntu and Debian flag it:

cat /var/run/reboot-required 2>/dev/null
cat /var/run/reboot-required.pkgs 2>/dev/null

RHEL family:

sudo dnf needs-restarting -r

needrestart (Debian/Ubuntu) also lists services still running old libraries after updates. Plan reboots in a quiet window, or use live patching (Ubuntu Pro Livepatch, kpatch on RHEL) for critical systems. See upgrade the Linux kernel.

Other useful kernel information

cat /proc/version                 # version and compiler
cat /proc/cmdline                 # boot parameters
lsmod | head                      # loaded modules
modinfo wireguard | head          # details about a module
systemd-detect-virt               # kvm, vmware, none (bare metal)…

systemd-detect-virt returns kvm on a KVM VPS, such as all VPS.DO VPS plans, and none on a dedicated server. KVM guests run their own kernel, so you can load modules (WireGuard, ZFS) and tune sysctl freely, unlike container-based virtualization. See KVM vs OpenVZ.

Kernel version requirements you’ll meet

Software Needs
WireGuard (in-kernel) 5.6+ (older kernels need a module package)
Docker (modern features, cgroup v2) 4.15+ / 5.x recommended
io_uring-based software 5.1+ (5.10+ in practice)
eBPF tools (bpftrace, Cilium) 4.9+ minimum, 5.x for full features

Distribution LTS kernels usually satisfy these. Check before installing low-level software.

Quick reference

Task Command
Kernel release uname -r
Architecture uname -m
All uname -a
Distribution cat /etc/os-release
Reboot needed? (Ubuntu) cat /var/run/reboot-required
Reboot needed? (RHEL) dnf needs-restarting -r
Virtualization systemd-detect-virt
Boot parameters cat /proc/cmdline

Related: dmesg and GRUB bootloader.

  • Linux
  • Kernel
  • Basics