How to Check Your Ubuntu Version on 26.04 and 24.04

Share

To check your Ubuntu version, open a terminal, run lsb_release -a, and read the Description and Release lines. On Ubuntu Desktop, you can also open Settings > System > About and read the operating system information.

This guide covers Ubuntu 26.04 LTS and 24.04 LTS, including servers, WSL and containers. You will also learn what the version numbers mean and which details to share when asking for help. If a result is confusing, leave a comment or contact us.

Before you begin
  • These checks read system information. They do not install updates, change your Ubuntu release or require sudo.
  • Run Ubuntu commands inside the Ubuntu system you want to check. On a server, connect through SSH first; on WSL, open your Ubuntu shell.
  • On the default Ubuntu desktop, press Ctrl+Alt+T to open a terminal. You can also search for your terminal application.
  • No internet connection is needed for a local check. If lsb_release is missing, use the /etc/os-release method below.

1. Check Ubuntu from the terminal

Step 1: Display the release information
Ubuntu terminal
lsb_release -a

Look for these lines. This example shows Ubuntu 26.04; your Description may include a point release such as 26.04.1.

Example output: Ubuntu 26.04
Distributor ID: Ubuntu
Description:    Ubuntu 26.04 LTS
Release:        26.04
Codename:       resolute

Description gives the readable name. Release is the main version used in compatibility requirements. Codename is the short release name often used in APT repository instructions.

Step 2: Show only the detail you need

For a short, readable answer, including the point release when recorded:

Ubuntu terminal
lsb_release -ds

For only the main release number:

Ubuntu terminal
lsb_release -rs

For only the repository codename:

Ubuntu terminal
lsb_release -cs

On Ubuntu 24.04, the last two commands return 24.04 and noble. The -s option removes labels; it does not change which release you are running.

These options are documented in the Ubuntu manuals for 24.04 and 26.04.

2. Check Ubuntu in Settings without commands

Step 1: Open the About page

Open Settings, select System, then select About. Read the Operating System entry. You can also search for About from the desktop overview.

Step 2: Open System Details if you need more

Open System Details where available. Look for OS Name for the Ubuntu release, and OS Type for the bitness. GNOME Version and Kernel Version describe other parts of the system; they are not your Ubuntu release.

This route is for the default GNOME-based Ubuntu Desktop. Kubuntu, Xubuntu and other desktops organize their settings differently. On a headless server or a terminal-only WSL installation, use the terminal methods. Canonical documents the System > About route.

3. Read /etc/os-release on minimal systems

Use this method when a small server, cloud image or container does not include lsb_release. It reads the operating system metadata directly:

Ubuntu terminal
cat /etc/os-release
Selected example fields: Ubuntu 24.04; other fields are omitted
PRETTY_NAME="Ubuntu 24.04 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04 (Noble Numbat)"
ID=ubuntu
VERSION_CODENAME=noble

Read PRETTY_NAME for the human-readable release. Use VERSION_ID for the main version and VERSION_CODENAME for the codename. To display only those fields:

Ubuntu terminal
grep -E '^(PRETTY_NAME|VERSION_ID|VERSION_CODENAME)=' /etc/os-release

If the file is absent, try the distribution-provided fallback:

Ubuntu terminal
cat /usr/lib/os-release

When both files exist, /etc/os-release takes precedence. Do not combine conflicting values from the two files. See the os-release specification.

4. Use hostnamectl for a wider system summary

Ubuntu terminal
hostnamectl

Find the Operating System line. Other lines can identify the running kernel, architecture, hardware and virtualization environment. This is useful when diagnosing a machine, but unnecessary if you only need the Ubuntu release.

Relevant line from example output; other system fields omitted
Operating System: Ubuntu 26.04 LTS

The hostnamectl command queries system services. It may fail in containers, chroots or WSL environments without working systemd services. Reading /etc/os-release avoids that dependency.

5. Understand releases, point releases and kernels

On a narrow screen, scroll the table sideways to read all columns.

What you see What it means Where to check
26.04 or 24.04 The Ubuntu release. The numbers identify the release year and month. lsb_release -rs
24.04.1, for example A point release within the 24.04 LTS series. It is still Ubuntu 24.04. lsb_release -ds or PRETTY_NAME
resolute or noble The repository codename for 26.04 or 24.04. Full names: Resolute Raccoon and Noble Numbat. lsb_release -cs
LTS Long Term Support. Check the release support policy separately from your installed version. Release description
Kernel release The Linux kernel currently running. Updates and hardware-enablement kernels can change it within one Ubuntu release. uname -r
amd64 or arm64 The native Debian package architecture, used when choosing compatible DEB downloads. dpkg --print-architecture

Why does one command show 24.04 and another show 24.04.1? The first identifies the release series; the second includes its recorded point release. They can both be correct. A point-release label does not prove every installed package is up to date, and it does not identify the ISO originally used to install the machine.

To check the running kernel and package architecture, run these separately:

Ubuntu terminal
uname -r
dpkg --print-architecture

uname -r reports the kernel release, not the Ubuntu release. Likewise, uname -a and uname -o are not reliable ways to identify Ubuntu 26.04 versus 24.04. Use the release metadata for that.

A regular package update and an upgrade from 24.04 to 26.04 are different tasks. To check whether your release is supported, consult Canonical’s release-cycle page.

6. Check the right WSL, server or container

WSL: choose the Ubuntu distribution first

In Windows PowerShell, list your installed distributions:

Windows PowerShell
wsl --list --verbose

Then use the exact name shown in the NAME column. This example assumes it is Ubuntu-24.04:

Windows PowerShell
wsl --distribution Ubuntu-24.04 -- cat /etc/os-release

The VERSION column in the list means WSL 1 or WSL 2. It is not the Ubuntu release. wsl --version describes WSL itself. A distribution’s registered name can also remain unchanged after an Ubuntu release upgrade, so read its actual metadata.

Microsoft documents these distinctions in its WSL command reference.

Server or cloud VM: run the check after connecting

Connect to the intended machine using your usual SSH command. Then run:

Remote Ubuntu shell
cat /etc/os-release

The result describes that remote machine. Running the command before connecting checks your local Linux environment instead. A virtual machine reports its guest Ubuntu release, not the operating system of the computer hosting it.

Docker: inspect an existing running container

From a host where you already have Docker access, list running containers and select the one you need:

Docker host terminal
docker ps

Replace my-container below with its name or ID:

Docker host terminal
docker exec my-container cat /etc/os-release

This reports the container’s user-space distribution. It may be Ubuntu, another distribution, or a minimal image without this file or command. It does not establish the host’s Ubuntu version. Containers share a kernel with their host environment, which may itself be a VM.

The Docker example uses docker exec against a running container; it does not create or replace one.

7. Choose the method that fits your task

On a narrow screen, scroll the table sideways to read all columns.

Your task Use this Reason
Find your Ubuntu version quickly lsb_release -ds One readable line, including the recorded point release.
Get the release and codename lsb_release -a Clearly labeled information for installation instructions.
Avoid the terminal on Ubuntu Desktop Settings > System > About Uses the desktop interface.
Check a minimal server or container cat /etc/os-release Does not require lsb_release or a running systemd service.
Collect a wider machine summary hostnamectl Adds kernel, architecture and other system information.
Check a release in a shell script ID and VERSION_ID Uses structured fields instead of parsing display text.
Optional: check the release in a shell script

This Bash/POSIX-shell example recognizes the two Ubuntu releases covered here. It reports a match; it does not certify that an application supports your machine. Run it only against the trusted operating system files on your own system.

Ubuntu terminal
(
    if [ -r /etc/os-release ]; then
        . /etc/os-release
    elif [ -r /usr/lib/os-release ]; then
        . /usr/lib/os-release
    else
        printf '%s\n' 'No readable OS release file found.' >&2
        exit 1
    fi
    case "${ID:-}:${VERSION_ID:-}" in
        ubuntu:24.04|ubuntu:26.04)
            printf 'Matched Ubuntu %s\n' "$VERSION_ID" ;;
        *)
            printf '%s\n' 'This is not Ubuntu 24.04 or 26.04.' ;;
    esac
)

The parentheses keep sourced variables out of your current shell. Checking ID as well as the version avoids treating an Ubuntu-based distribution as Ubuntu itself.

8. Fix common version-check problems

1. lsb_release: command not found

Use cat /etc/os-release. There is no need to install a package just to identify the release. This is common on minimal images.

2. No LSB modules are available

This informational message can appear with some lsb_release implementations. If the Description, Release and Codename lines follow it, you still have the information you need. Use lsb_release -ds or read the release file for a shorter result.

3. hostnamectl cannot connect to the bus

Messages about D-Bus or a system that was not booted with systemd mean this method cannot reach its required services. Use cat /etc/os-release. You do not need to enable systemd just to check a release.

4. The results disagree

First confirm you ran both commands in the same machine, WSL distribution, container or SSH session. A main release and its point-release label are not a conflict. If the main versions differ after an interrupted upgrade, investigate the upgrade or package state; do not edit os-release to make the numbers match.

5. About is missing, or the result is not Ubuntu

Other desktops use different menus, and servers may have no Settings app. Use the terminal method. If ID names another distribution, follow that distribution’s instructions; an Ubuntu-compatible base is not a guarantee that every Ubuntu repository will work.

6. Both release files are missing

You may be in a recovery environment, an unusually small container, or a damaged installation. Check which environment you opened and consult its image or recovery documentation. Do not guess the Ubuntu release from its kernel number or create a replacement file with guessed values.

Share useful details when asking for help

For a driver, package or installation problem, share your Ubuntu description, running kernel and package architecture. On a system with lsb_release:

Ubuntu terminal
lsb_release -ds
uname -r
dpkg --print-architecture

If lsb_release is missing, share the PRETTY_NAME line from /etc/os-release instead. Also say whether you are using Desktop, Server, WSL or a container, and include the exact error.

Frequently asked questions

What is the quickest command to check my Ubuntu version?

Run lsb_release -ds for one readable line. Use lsb_release -a if you also need the main release number and codename.

How do I check the Ubuntu point release?

Run lsb_release -ds or read PRETTY_NAME in /etc/os-release. These can include the point-release number. VERSION_ID and lsb_release -rs normally identify the main release series, such as 24.04.

Does uname -r show my Ubuntu version?

No. It shows the running Linux kernel release. Use lsb_release or /etc/os-release to identify the Ubuntu release.

Do I need sudo or an internet connection?

No. The local version checks in this guide do not require sudo or internet access. Connecting to a remote server still requires access to that server, and Docker examples require existing Docker permissions.

Does WSL version 2 mean Ubuntu 24.04 or 26.04?

No. WSL 2 is the environment that runs the distribution. Check /etc/os-release inside the selected Ubuntu distribution to identify its Ubuntu release.

Can a version check tell me whether all updates are installed?

No. Release metadata identifies the operating system, not the update status of every package. A point-release label alone is not proof that all security or application updates are installed.

Related guides: Essential Linux commands for Ubuntu | Upgrade from Ubuntu 24.04 to 26.04 LTS | Things to do after installing Ubuntu 26.04.