Check Ubuntu Version – Quick & Simple

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
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 architectureIn 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
- Short version
- Method 1 - The os-release File
- Method 2 - The lsb_release File
- Method 3 - The issue File
- Method 4 - The lsb_release Command
- Less Information
- Method 5 - The hostnamectl Command
- Method 6 - Check Ubuntu Version with GUI
- FAQ
- How do I check my Ubuntu version from the terminal?
- How do I know if my Ubuntu is an LTS release?
- Why does lsb_release say command not found?
- Is my Ubuntu version still supported?
- Do these commands work on WSL 2?
- Summary
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:
cat /etc/os-releaseOutput:

Method 2 - The lsb_release File
We can also read the lsb-release file located in the /etc/ folder to check Ubuntu versions:
cat /etc/lsb-releaseOutput:

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:
cat /etc/issueOutput:

Method 4 - The lsb_release Command
Another way is by using the built-in lsb_release command:
lsb_release -aNote: This needs the lsb-release package, which minimal images and containers can lack. See the FAQ below.
Output:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 26.04.1 LTS
Release: 26.04
Codename: resoluteLess Information
You can also use the -d flag to shorten the output:
lsb_release -dOutput:
Description: Ubuntu 26.04.1 LTSMethod 5 - The hostnamectl Command
We can also use the hostnamectl command to check our Ubuntu version:
hostnamectlNote: This needs systemd, so it can fail in containers and on WSL 2 distros without systemd enabled.
Output:
Static hostname: ceos3c-ubuntu
Icon name: Virtual Machine
Chassis:
Machine ID:
Boot ID:
Operating System: Ubuntu 26.04.1 LTS
Kernel:
Architecture: x86-64Method 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:
- Click on the Show Applications button in the lower-left corner.
- Click on Settings (type settings in the search bar if you can’t find it).
- 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:
- You can read the
os-releasefile. - You can read the
lsb-releasefile. - You can read the
issuefile. - You can use the
lsb_releasecommand with either the-aor the-dflag. - You can use the
hostnamectlcommand.
🐧 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
More posts
All Linux

