Guide · Basics

How to check your Linux version (and which distro you're on)

Whether you're following a tutorial, filing a bug report, or just inherited a machine, the first question is always the same: what exactly is running here? Three commands answer it completely.

A terminal window on a dark screen
Everything you need is one command away.

1. Which distro and version? cat /etc/os-release

This is the most reliable, works almost everywhere. The line that matters is PRETTY_NAME — e.g. Ubuntu 24.04 LTS or Fedora Linux 40. That's your distribution and release in one line.

2. Which kernel? uname -r

The kernel is the core of Linux, versioned separately from your distro. uname -r prints something like 6.8.0-31-generic. Use uname -a for the full picture including your CPU architecture (x86_64, aarch64, etc.).

3. The friendly all-in-one: lsb_release -a

On Debian/Ubuntu-family systems this prints distributor, description, release and codename together. If it's missing, /etc/os-release from step 1 always works.

Why it matters: the right install command, package name and tutorial all depend on your distro family (Debian-based uses apt, Fedora uses dnf, Arch uses pacman). Knowing your distro tells you which guide to follow.

New to the terminal generally? Start with our essential Linux commands. Picking a machine's specs? See how much RAM Linux really needs. And for tech reading beyond Linux, Infoozle covers the wider world.