How to Check Your Linux Version (Distro, Kernel, and More)

Knowing which version of Linux you're running isn't just trivia — it affects software compatibility, security updates, troubleshooting steps, and whether your system can handle certain applications. The process is straightforward, but the right command depends on what exactly you need to know and which Linux distribution you're using.

What "Linux Version" Actually Means

This is where a lot of confusion starts. Linux version can refer to two distinct things:

  • The kernel version — the core of the operating system itself, developed by Linus Torvalds and the Linux kernel team
  • The distribution version — the packaged operating system built around that kernel, such as Ubuntu 22.04, Fedora 39, or Debian 12

A system running Ubuntu 22.04 and a system running Fedora 39 might both use a similar kernel version, but they're entirely different environments with different package managers, release cycles, and software ecosystems. When most people ask "what version of Linux am I running," they usually want the distribution version — but sometimes they need both.

How to Check Your Linux Distribution Version

Using lsb_release

The most widely supported command across distributions is:

lsb_release -a 

This outputs the distributor ID, description, release number, and codename. Example output on Ubuntu:

Distributor ID: Ubuntu Description: Ubuntu 22.04.3 LTS Release: 22.04 Codename: jammy 

Not every distribution ships with lsb_release installed by default, but it's available in most major distros.

Reading /etc/os-release

This file exists on virtually every modern Linux system and is the most reliable cross-distro method:

cat /etc/os-release 

You'll see variables like NAME, VERSION, ID, and VERSION_ID that tell you exactly what distribution and version you're on. This file is standardized across distributions that follow the systemd conventions, which includes almost all mainstream distros today.

Checking /etc/issue

An older but still functional fallback:

cat /etc/issue 

This was traditionally displayed as a login banner. It works, but it's less detailed than /etc/os-release.

How to Check the Linux Kernel Version

The kernel version is separate from the distribution version and matters when you're dealing with driver compatibility, hardware support, or low-level system behavior.

uname -r 

Example output:

6.2.0-39-generic 

For more detailed output including architecture and build date:

uname -a 

The version string follows a format: major.minor.patch, sometimes followed by distribution-specific suffixes. Kernel 6.x represents recent releases, while 5.x kernels are still common on LTS distributions. The kernel version your distro ships with is often different from the latest upstream kernel — distributions typically backport security fixes rather than shipping the absolute latest kernel.

Quick Reference: Commands and What They Tell You 🐧

CommandWhat It Shows
lsb_release -aDistribution name, version, codename
cat /etc/os-releaseFull distro details (most reliable)
cat /etc/issueBasic distro info (legacy method)
uname -rKernel version only
uname -aKernel version + architecture + build info
hostnamectlDistro, kernel, and hardware info in one

The hostnamectl Command

On systems running systemd (the majority of modern Linux installations), this single command surfaces both distribution and kernel information together:

hostnamectl 

It returns the operating system, kernel version, architecture, and hostname in a clean, readable format — useful when you need a quick full picture.

Checking Without Terminal Access

If you're working in a graphical desktop environment, most Linux distributions expose version information through the system settings panel. Look for:

  • Settings → About (GNOME-based desktops like Ubuntu)
  • System Settings → About this System (KDE Plasma)
  • Help → About in some distribution-specific tools

These GUI paths vary by desktop environment — GNOME, KDE Plasma, XFCE, and others each have different layouts. The terminal commands above are more consistent across setups.

Variables That Change What You Need to Check

Which method is most useful depends on your situation:

  • Running scripts or software installs — you likely need the distribution name and version number to confirm package manager compatibility (apt, dnf, pacman, etc.)
  • Troubleshooting hardware or drivers — the kernel version is usually what matters, since driver support is tied to kernel releases
  • Security auditing — both matter; distribution version determines EOL (end-of-life) status, while kernel version affects patch coverage
  • Working on a remote server — terminal commands are your only option; /etc/os-release is the most reliable since it doesn't require any package to be installed
  • Minimal or embedded Linux installs — some stripped-down systems won't have lsb_release available, making /etc/os-release or uname the only options

Distributions Behave Differently 💡

Rolling release distributions like Arch Linux or openSUSE Tumbleweed don't have traditional version numbers in the same way that point-release distributions like Ubuntu or Debian do. On a rolling release system, version information in /etc/os-release may show a build date or a rolling identifier rather than a fixed version number. The kernel version becomes more meaningful as a reference point on those systems.

LTS (Long-Term Support) distributions — Ubuntu LTS, Debian stable, RHEL — ship older but heavily tested kernel versions and maintain them for years. A system showing kernel 5.15.x may be running a fully supported, actively patched environment, not an outdated one.

The gap between what version you're running and what version you need for a specific task is where individual setups start to diverge — and that's entirely shaped by what you're trying to accomplish and how your system was originally configured.