Check Ubuntu Version – Quick & Simple

Check Ubuntu Version Featured Image

To check your Ubuntu version, run lsb_release -a in a terminal. It prints the release number and codename, for example 26.04 and resolute. The same details are in cat /etc/os-release and hostnamectl. The Settings app shows them too, under About.

Short version

Terminalbash
lsb_release -a        # release number and codename
lsb_release -d        # one line only
cat /etc/os-release   # works everywhere, even without lsb-release
hostnamectl           # OS, kernel and architecture

In this tutorial, you’ll learn how to check your Ubuntu version by using the command line or the Ubuntu Desktop GUI. We cover every common way in this article. The sample outputs below use Ubuntu 26.04.1 LTS, the current long-term support release (Resolute Raccoon). The screenshots are from older releases, but the output format is the same.

Table of Contents

Method 1 - The os-release File

We can read the os-release file located in /etc/ using the cat command to find out which Ubuntu version we are running:

Terminalbash
cat /etc/os-release

Output:

Check Ubuntu Version Method 1

Method 2 - The lsb_release File

We can also read the lsb-release file located in the /etc/ folder to check Ubuntu versions:

Terminalbash
cat /etc/lsb-release

Output:

Check Ubuntu Version Method 2

Method 3 - The issue File

Another file we can check to figure out which Ubuntu version we are running is the issue file located in the /etc/ folder:

Terminalbash
cat /etc/issue

Output:

Check Ubuntu Version Method 3

Method 4 - The lsb_release Command

Another way is by using the built-in lsb_release command:

Terminalbash
lsb_release -a

Note: This needs the lsb-release package, which minimal images and containers can lack. See the FAQ below.

Output:

Snippettext
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 26.04.1 LTS
Release:	26.04
Codename:	resolute

Less Information

You can also use the -d flag to shorten the output:

Terminalbash
lsb_release -d

Output:

Snippettext
Description:	Ubuntu 26.04.1 LTS

Method 5 - The hostnamectl Command

We can also use the hostnamectl command to check our Ubuntu version:

Terminalbash
hostnamectl

Note: This needs systemd, so it can fail in containers and on WSL 2 distros without systemd enabled.

Output:

Snippettext
Static hostname: ceos3c-ubuntu
Icon name: Virtual Machine
Chassis: 
Machine ID:
Boot ID:
Operating System: Ubuntu 26.04.1 LTS
Kernel:
Architecture: x86-64

Method 6 - Check Ubuntu Version with GUI

If you are uncomfortable using the command line, you can also check your Ubuntu version inside of the Ubuntu GUI:

  1. Click on the Show Applications button in the lower-left corner.
  2. Click on Settings (type settings in the search bar if you can’t find it).
  3. Select About from the left navigation menu and scroll down until you find the OS Name field.

The layout of the Settings app changes between releases. On current GNOME versions, About sits under System.

FAQ

How do I check my Ubuntu version from the terminal?

Run lsb_release -d for a one-line answer or lsb_release -a for the release number and codename. If the command is missing, cat /etc/os-release works on every Ubuntu install and shows VERSION_ID.

How do I know if my Ubuntu is an LTS release?

Look for “LTS” in the Description line from lsb_release -d or in PRETTY_NAME in /etc/os-release. LTS releases come out every two years in April, so 22.04, 24.04 and 26.04 are LTS. Releases like 25.10 are interim and only get nine months of support.

Why does lsb_release say command not found?

The lsb-release package is not installed, which is common on minimal server images and containers. Install it with sudo apt install lsb-release, or skip it and read /etc/os-release instead.

Is my Ubuntu version still supported?

As of November 2026, 26.04 LTS is supported until May 2031, 24.04 LTS until June 2029 and 22.04 LTS until June 2027. Ubuntu 20.04 reached the end of standard support in May 2025 and only gets security updates through Ubuntu Pro. Check the Ubuntu release list for exact dates.

Do these commands work on WSL 2?

Yes. Run them inside the Ubuntu shell, not in PowerShell. cat /etc/os-release and lsb_release -a work everywhere. hostnamectl needs systemd, which newer Ubuntu WSL images enable by default.

Summary

This is how easy it is to check Ubuntu versions. To summarize:

  1. You can read the os-release file.
  2. You can read the lsb-release file.
  3. You can read the issue file.
  4. You can use the lsb_release command with either the -a or the -d flag.
  5. You can use the hostnamectl command.

🐧 There are some related articles!
👉 Top Things to do after installing Kali Linux 👉 Linux on Windows - The Complete WSL 2 Tutorial Series 👉 Create Generalized Windows Images with FOG Server 👉 Install FOG Server on Ubuntu 👉 Install Kali Linux on Windows - Complete Guide 👉 The Complete Kali Linux and Windows Dual Booting Guide 👉 Cronjob - The Complete Guide to Cronjobs 👉 Open Bitlocker Drive on Linux - Quick & Easy

whoami

Stefan founded Ceos3c in 2016 and has spent a decade teaching cybersecurity, Linux, and web development through hands-on tutorials. He builds and ships real products while sharing his journey: ProofSwap.me, XPMetric.com, and EasyEarningsTracker.com.

More about me