Updated: 4 November 2026 · Applies to: Ubuntu 26.04 LTS (26.04.1) and 24.04 LTS (24.04.5), Ubuntu Desktop (GNOME Settings 46 and 50) and Ubuntu Server
To check your Ubuntu version, open a terminal (or log in over SSH) and run lsb_release -a. The Description line shows the full version, for example Ubuntu 26.04.1 LTS. If that command is missing, cat /etc/os-release shows the same information on every Ubuntu system. On Ubuntu Desktop you can also open Settings › System › About and read the Operating System line.
Check the Ubuntu version from the command line
- Open a terminal. On Ubuntu Desktop press Ctrl+Alt+T. On a server or VPS, connect with SSH (or use the VPS console, see access your VPS with VNC, if SSH does not work).
- Run:
lsb_release -a
On our Ubuntu 26.04 test system it printed:Distributor ID: Ubuntu Description: Ubuntu 26.04.1 LTS Release: 26.04 Codename: resolute
On Ubuntu 24.04 the same command printedUbuntu 24.04.5 LTS, release24.04and codenamenoble. - Read the result:
- Description: the full version including the point release (
26.04.1) and whether it is an LTS release. - Release: the main version number (
26.04). This is what most install guides ask for. - Codename: the short code name (
resolute,noble) used in repository lines and some download links.
- Description: the full version including the point release (
Only need one value? Add -s (short) to drop the labels:
lsb_release -ds # Ubuntu 26.04.1 LTS lsb_release -rs # 26.04 lsb_release -cs # resolute
Other commands that show the Ubuntu version
/etc/os-release is a plain text file that every current Ubuntu release has, including minimal systems where lsb_release is missing (the official Ubuntu 24.04 and 26.04 container images do not include it):
cat /etc/os-release
The first lines on our 26.04 system:
PRETTY_NAME="Ubuntu 26.04.1 LTS" NAME="Ubuntu" VERSION_ID="26.04" VERSION="26.04.1 LTS (Resolute Raccoon)" VERSION_CODENAME=resolute ID=ubuntu ID_LIKE=debian
It also gives the full code name (Resolute Raccoon; on 24.04 it showed 24.04.5 LTS (Noble Numbat)). In fact, lsb_release on 24.04 and 26.04 is a small shell script that reads this file.
hostnamectl shows the version together with the kernel and the architecture. Shortened output from our 26.04 test:
hostnamectl
...
Operating System: Ubuntu 26.04.1 LTS
Architecture: x86-64
/etc/issue is the text shown before the console login prompt, so it also reveals the version: cat /etc/issue printed Ubuntu 26.04.1 LTS \n \l (the \n and \l are placeholders for the host name and terminal).
Check the Ubuntu version in Settings (desktop)
These labels come from GNOME Settings 46 (Ubuntu 24.04) and 50 (Ubuntu 26.04); both use the same layout:
- Open Settings (press the Super key, type settings and press Enter).
- Select System in the sidebar, then About (“Hardware details and software versions”).
- The Operating System line shows the version, for example Ubuntu 24.04.5 LTS.
- For more detail, select System Details. It lists OS Name, OS Type (64-bit), GNOME Version, Windowing System and Kernel Version, and has a Copy button for support tickets.
On Ubuntu 22.04 (GNOME Settings 41), About is a separate entry in the Settings sidebar, and the OS Name line is shown on that page directly.
How to read an Ubuntu version number
- The number is the year and month of the release: 26.04 came out in April 2026, 24.04 in April 2024.
- LTS (long-term support) releases come every two years in April. Canonical gives them five years of standard security updates (to 2031 for 26.04, 2029 for 24.04 and 2027 for 22.04), and more with Ubuntu Pro. Releases without LTS, such as 25.10, get nine months of updates.
- The third number is the point release (26.04.1, 24.04.5). It is the same release with the updates rolled in, not a new version;
aptupdates move you to the latest point release.
If your release is close to the end of its support, plan the move to the next LTS: how to upgrade Ubuntu to 26.04 LTS. To install the latest updates for the version you already have, see how to update all packages on Linux safely.
Use the version in a script
Read /etc/os-release as shell variables, so the script works even where lsb_release is not installed:
. /etc/os-release echo "$VERSION_ID $VERSION_CODENAME"
This printed 26.04 resolute on our test system. For a condition, compare $VERSION_ID, for example [ "$VERSION_ID" = "24.04" ].
Common mix-ups
- uname -r is the kernel, not Ubuntu. It shows the Linux kernel version only. Inside a container it even shows the host’s kernel: in our Ubuntu 26.04 container,
hostnamectlreported Ubuntu 26.04.1 LTS but a kernel from the host system. Kernel checks are covered in how to check the kernel version in Linux. - /etc/debian_version exists on Ubuntu but names the Debian base it was built from (
forky/sidon 26.04,trixie/sidon 24.04), not the Ubuntu version. - “lsb_release: command not found” means the
lsb-releasepackage is not installed. Usecat /etc/os-release, or install it withsudo apt install lsb-release. The same error on Debian is explained in lsb_release command error on Debian. - Not sure the server runs Ubuntu at all? Find out what version of Linux you are running covers AlmaLinux, Rocky Linux, Debian and others.
Official documentation: Ubuntu release cycle and lsb_release manual page.