How to Check the Version of Ubuntu on Your System
Knowing which version of Ubuntu you're running matters more than you might expect. Software compatibility, security patch eligibility, support timelines, and package availability all hinge on your specific release. Whether you're troubleshooting an issue, following a tutorial, or deciding whether to upgrade, checking your Ubuntu version is the logical first step — and there are several ways to do it.
Why Your Ubuntu Version Number Matters
Ubuntu follows a predictable release cycle: standard releases every six months (April and October), and Long Term Support (LTS) releases every two years. LTS versions receive security updates and official support for five years; standard releases are supported for only nine months.
This distinction has real consequences. If you're running Ubuntu 20.04 LTS, you're on a supported, stable track. If you're running Ubuntu 23.10, that release reached end-of-life in July 2024. Running an unsupported version means no more security patches from Canonical — a meaningful risk for any system connected to the internet.
Version numbers follow the format YY.MM — so 22.04 was released in April 2022, and 24.04 in April 2024.
Method 1: Check Ubuntu Version Using the Terminal 💻
The terminal is the fastest and most reliable way to check your Ubuntu version, regardless of which desktop environment you're using — or whether you're working on a headless server with no GUI at all.
Using lsb_release
Open a terminal and run:
lsb_release -a You'll see output similar to:
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.3 LTS Release: 22.04 Codename: jammy The Description line gives you the full version and whether it's LTS. The Codename (like jammy, focal, or noble) is what Ubuntu uses internally for package repositories — useful when configuring software sources manually.
Using /etc/os-release
Another reliable option:
cat /etc/os-release This file is a standard across most Linux distributions and returns structured information including VERSION_ID, VERSION_CODENAME, and PRETTY_NAME. It's especially useful in scripts or automated environments where you need to parse version data programmatically.
Using hostnamectl
hostnamectl This command, part of systemd, shows the operating system, kernel version, hardware architecture, and hostname in a single output. It's useful when you want a broader system snapshot alongside the OS version.
Method 2: Check Ubuntu Version Through the GUI 🖥️
If you're running a desktop environment — typically GNOME on Ubuntu — you can check the version without opening a terminal.
On Ubuntu 22.04 and later (GNOME):
- Open the Activities menu or press the Super key
- Search for and open Settings
- Scroll to System (or About in older versions)
- Select About — the Ubuntu version appears under OS Name or Operating System
This method works well for users who aren't comfortable with the terminal, but it shows slightly less detail than the command-line methods. You typically won't see the patch sub-version (e.g., 22.04.3) or the codename from this view.
Method 3: Check the Kernel Version (Not the Same Thing)
It's worth understanding the difference between the Ubuntu release version and the Linux kernel version — they're related but distinct.
To check your kernel version:
uname -r This returns something like 5.15.0-91-generic. The kernel version affects hardware compatibility, driver support, and certain system-level features. A newer kernel can be installed on an older Ubuntu release, and newer Ubuntu releases may ship with multiple supported kernel options.
| Command | What It Shows |
|---|---|
lsb_release -a | Ubuntu release, codename, LTS status |
cat /etc/os-release | Structured OS metadata, scriptable |
hostnamectl | OS version + kernel + architecture |
uname -r | Linux kernel version only |
| Settings → About | GUI overview, less detail |
Variables That Affect Which Method Works Best
Not every method works in every context. A few factors shape which approach makes sense:
Desktop vs. server: Headless Ubuntu Server installations have no GUI, so terminal methods are your only option. Desktop users have both.
Ubuntu flavor vs. standard Ubuntu: Ubuntu comes in official flavors — Kubuntu, Xubuntu, Ubuntu MATE, and others. These share the same base version but use different desktop environments. The lsb_release command works identically across all of them; the GUI path varies by desktop.
Minimal installations and containers: Stripped-down Ubuntu instances (common in Docker containers or cloud images) may not have lsb_release installed by default. In those cases, /etc/os-release is the more universally available fallback.
Remote access: If you're SSHed into a remote Ubuntu machine, terminal commands are your primary tool regardless of what desktop environment might be installed.
What the Version Tells You — and What It Doesn't
Knowing you're on Ubuntu 22.04 LTS tells you that you're within the supported window, eligible for official security updates, and running a release with broad software compatibility. It tells you which package repositories apply to your system and helps you follow version-specific documentation accurately.
What it doesn't tell you is whether your specific packages, drivers, or third-party software are up to date — those are managed separately through your package manager. A fully patched Ubuntu 22.04 system and a neglected one share the same base version number but differ significantly in their actual security posture.
The version is the starting point. What you do with that information — whether you update, upgrade, or reconfigure — depends entirely on what your system is used for, who manages it, and what's running on it. 🔍