How to Find Your Ubuntu Version: Every Method Explained
Knowing which version of Ubuntu you're running matters more than it might seem. Software compatibility, security support windows, available packages, and troubleshooting instructions all depend on it. The good news: Ubuntu makes this information easy to retrieve — once you know where to look.
Why Your Ubuntu Version Number Matters
Ubuntu follows a predictable release cycle: standard releases every six months, and Long Term Support (LTS) releases every two years. LTS versions receive security updates and maintenance for five years; standard releases are only supported for nine months.
If you're installing software, following a tutorial, or asking for help online, the version number is often the first thing you'll need. Running commands designed for Ubuntu 22.04 on Ubuntu 18.04 can produce errors or unexpected behavior. Knowing exactly what you have is the starting point.
Ubuntu version numbers follow a year.month format — so 22.04 was released in April 2022, and 24.04 in April 2024. Each release also has a codename (like Jammy Jellyfish or Noble Numbat) that you'll see referenced in package repositories and documentation.
Method 1: The Fastest Terminal Command 🖥️
Open a terminal and run:
lsb_release -a This outputs something like:
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.3 LTS Release: 22.04 Codename: jammy This is the most reliable, universally compatible method. It works on desktop installs, server installs, WSL (Windows Subsystem for Linux), and remote SSH sessions alike. The -a flag means "all" — it shows the distributor, full description, release number, and codename in one block.
If you only want the version number itself without extra output, use:
lsb_release -r Method 2: Reading the os-release File
Another terminal approach — particularly useful in scripts or automated environments:
cat /etc/os-release This reads a plain-text file that Ubuntu (and most modern Linux distributions) maintains with system identification data. You'll see output like:
NAME="Ubuntu" VERSION="22.04.3 LTS (Jammy Jellyfish)" ID=ubuntu ID_LIKE=debian VERSION_ID="22.04" The /etc/os-release file is part of the freedesktop.org standard, so this method works consistently across distributions — useful if you're ever managing mixed Linux environments.
Method 3: The hostnamectl Command
hostnamectl This command is primarily used to manage hostname settings, but it also returns operating system information:
Operating System: Ubuntu 22.04.3 LTS Kernel: Linux 5.15.0-88-generic Architecture: x86-64 This method is particularly handy when you also need kernel version and architecture in the same output — relevant when troubleshooting driver issues or hardware compatibility.
Method 4: Checking via the GUI (Desktop Users) 🖱️
If you're on the Ubuntu desktop and prefer not to use the terminal:
- Open Settings
- Scroll to the bottom of the left sidebar and click About
- Look for OS Name or Ubuntu Version
The exact navigation varies slightly between Ubuntu releases and desktop environments:
| Desktop Environment | Path |
|---|---|
| GNOME (default Ubuntu) | Settings → About |
| KDE Plasma (Kubuntu) | System Settings → About This System |
| XFCE (Xubuntu) | Applications Menu → About Xfce (for DE version) — use terminal for OS version |
| MATE (Ubuntu MATE) | System → About MATE |
On GNOME-based Ubuntu, the About screen typically shows the full version name, release number, and sometimes the codename.
Method 5: uname for Kernel vs. OS Version
A common point of confusion — the uname command tells you about the Linux kernel, not the Ubuntu release:
uname -r Output example: 5.15.0-88-generic
This is the kernel version, not the Ubuntu version. They move independently. Ubuntu 20.04 and Ubuntu 22.04 can both run different kernel versions depending on updates applied. If someone asks which Ubuntu version you have, uname alone won't answer that question — but it's essential information when dealing with kernel modules, drivers, or low-level system behavior.
Understanding What the Version Number Tells You
The full version string — say, 22.04.3 — breaks down like this:
- 22.04 — the base release (year 2022, month 04)
- .3 — the point release, indicating a set of accumulated updates bundled into the installation image
Point releases don't change the core system for existing installations. If you installed 22.04.1 and have been updating regularly, you're functionally running the same system as someone who installed 22.04.3 fresh. The point release mainly matters when downloading an ISO.
Variables That Affect Which Method Works Best
Not every method is available in every context, and the right approach depends on your situation:
Access type — On a remote server without a GUI, terminal commands are your only option. On a desktop, you have both.
Scripting vs. interactive use — /etc/os-release is more predictable in scripts because it outputs structured key=value pairs that are easy to parse. lsb_release requires the lsb-release package to be installed, which is standard on desktops but occasionally missing on minimal server installs.
Flavor vs. official Ubuntu — If you're running Kubuntu, Lubuntu, or Xubuntu, the version number refers to the Ubuntu base, not the desktop environment. The terminal methods still return the Ubuntu version correctly.
Containerized environments — In Docker containers running Ubuntu base images, the GUI is unavailable and hostnamectl may behave differently. /etc/os-release and lsb_release -a remain reliable. 🐧
WSL (Windows Subsystem for Linux) — All terminal methods work normally inside a WSL session. The GUI approach does not apply.
The same version number can mean different things in practice depending on how up-to-date the package list is, whether optional hardware enablement stacks have been installed, and how the system was provisioned — factors that matter most when you move from identifying the version to actually acting on that information.