How to Check Your Linux Distro and Kernel Version

Three commands answer 95% of the “what am I running?” questions. They work on every distribution in our comparison tool and on the BSDs (with small variations).

1. The distribution: /etc/os-release

cat /etc/os-release — present on every modern Linux system (Debian, Ubuntu, Fedora, the RHEL family, Arch, Void, Alpine). The PRETTY_NAME field is the human-readable identity; VERSION_ID and VERSION_CODENAME matter for repositories.

2. The kernel: uname -r

uname -r prints the running kernel version (for example 6.12.0-25-generic). Compare it against the Latest kernel column on the distro pages here to see how current your system is. On the BSDs use uname -r as well — the format differs (FreeBSD 14.1-RELEASE).

3. The full picture: hostnamectl

hostnamectl (systemd systems) prints OS, kernel, architecture and hostname in one output. On non-systemd systems — Void (runit), Artix (OpenRC), Alpine — use uname plus /etc/os-release separately.

Why the kernel version matters

Security fixes land in kernel point releases; hardware support (new CPUs, GPUs, Wi-Fi chipsets) also arrives through kernels. If your kernel trails the Latest kernel figure on our distro pages by a major version, schedule an update window.

Related comparisons

Check how current the major distros are:

Want to run these side by side? Launch two cheap VPS instances: