How to check Ubuntu version: the short answer
The quickest way to check your Ubuntu version is to open a terminal and run lsb_release -a. It prints the release number, such as 24.04.5 LTS, and the codename, such as noble. If that command is missing, cat /etc/os-release works on every current Ubuntu system, including minimal server and container images. Both read the installed release, not the kernel, so they answer the question "what version of Ubuntu do I have" directly.
The same commands work on a desktop, on a laptop and on a remote server you reach over SSH. The sections below show each method, what its output means, and how to tell whether your release still gets security updates.
Quick checklist
- Run
lsb_release -afor the release number and codename. - If it is not installed, run
cat /etc/os-release. - Run
hostnamectlto see the release and the kernel together. - Run
uname -ronly when you need the kernel version. - Compare your release with the support table below, then run
pro security-status. - If standard support has ended or ends soon, take a snapshot and plan an upgrade.
The Ubuntu version command: lsb_release
lsb_release comes from the lsb-release package, which a normal Ubuntu desktop or server install includes. Run it with -a for all fields:
lsb_release -a
Typical output on Ubuntu 24.04 looks like this:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.5 LTS
Release: 24.04
Codename: noble
The first line is a harmless notice and can be ignored. Description gives the full release including the point release, Release gives the base version, and Codename is the short name that appears in APT sources. For a single value in a script, use lsb_release -rs (release only) or lsb_release -cs (codename only).
How to find Ubuntu version with /etc/os-release
Every systemd-based distribution ships /etc/os-release, so this is the most dependable method, and it needs no extra package:
cat /etc/os-release
Look at PRETTY_NAME (for example Ubuntu 24.04.5 LTS), VERSION_ID (24.04) and VERSION_CODENAME (noble). To print one line only, filter it:
grep -E '^(PRETTY_NAME|VERSION_ID)=' /etc/os-release
Ubuntu also keeps /etc/lsb-release, which holds the same details as DISTRIB_RELEASE and DISTRIB_CODENAME.
How to see Ubuntu version and kernel with hostnamectl
hostnamectl is part of systemd and is mainly for setting the hostname, but with no arguments it shows a status summary:
hostnamectl
Read the Operating System line for the Ubuntu release and the Kernel line for the running kernel. It also shows the architecture and, on a VPS, the virtualisation type, such as kvm. That makes it a handy one-command overview when you log in to an unfamiliar server.
How to know Ubuntu version: other methods
/etc/issue
cat /etc/issue prints the text shown before a console login, for example Ubuntu 24.04.5 LTS \n \l. The \n and \l are placeholders for the hostname and terminal. It is quick, but an administrator can edit this file to show a custom banner, so treat /etc/os-release as the authority.
The desktop: Settings, About
On Ubuntu Desktop, open Settings and go to System, then About (in older releases, About sits directly in the Settings sidebar). The OS Name field shows the release, for example Ubuntu 24.04.5 LTS. There is no GUI on a server, so use the terminal methods there.
uname -r shows the kernel, not the Ubuntu release
A common mistake is to run uname -r, see something like 6.8.0-xx-generic, and treat that as the Ubuntu version. It is the Linux kernel version. Ubuntu 24.04 shipped with a 6.8 kernel, but an LTS release can move to a newer hardware enablement (HWE) kernel during its life, and a container shares the host's kernel, so the kernel number does not reliably tell you the release. Use uname -r when a driver or tool asks for the kernel; use lsb_release or /etc/os-release for the release.
How to check Ubuntu version on a VPS over SSH
You do not need to open an interactive session. Pass the command to ssh and it runs on the server and prints the result locally:
ssh deploy@203.0.113.10 'cat /etc/os-release | grep PRETTY_NAME'
ssh deploy@203.0.113.10 'hostnamectl'
Replace the user and address with your own. Ubuntu servers also print the release in the login message (the "Welcome to Ubuntu" line), but that text depends on configuration, so run a command when you need certainty. If SSH will not connect at all, see SSH connection refused: causes and fixes.
What LTS and point releases mean
Ubuntu releases every six months, in April and October, and the version number is the year and month: 24.04 means April 2024. Every second year the April release is a Long Term Support (LTS) release. Canonical gives LTS releases five years of standard security maintenance for the main repository, with Expanded Security Maintenance (ESM) available afterwards through Ubuntu Pro. Interim releases, such as 26.10, get nine months.
A point release, such as 24.04.1 or 24.04.5, is not a new version. It is a refreshed install image that rolls up the updates published so far, sometimes with a newer kernel. A 24.04 system kept up to date with apt is the same release whatever its point number.
Ubuntu releases, codenames and support dates
| Release | Codename | Type | Standard support ends | ESM (Ubuntu Pro) ends |
|---|---|---|---|---|
| 20.04 | Focal Fossa (focal) | LTS | May 2025 (ended) | May 2030 |
| 22.04 | Jammy Jellyfish (jammy) | LTS | May 2027 | May 2032 |
| 24.04 | Noble Numbat (noble) | LTS | May 2029 | May 2034 |
| 26.04 | Resolute Raccoon (resolute) | LTS | May 2031 | May 2036 |
| 26.10 | Stonking Stingray (stonking) | Interim | July 2027 | Not offered |
Dates are from Canonical's release cycle page as of November 2026; check ubuntu.com/about/release-cycle before planning around them.
Check whether your release is still supported
Ubuntu's Pro client, installed by default, reports coverage for the packages on your system:
pro security-status
On a release inside its LTS window, the output says the machine is receiving security patching for the Main/Restricted repository until a stated year. If the LTS period has ended and esm-infra is not enabled, it says plainly that the machine is not receiving security patches. pro status shows whether the machine is attached to an Ubuntu Pro subscription and which services are enabled. Older releases also shipped an ubuntu-security-status tool that gives a similar summary.
What to do next: upgrading your release
If your release is out of standard support, or close to it, upgrade to the next LTS. Do it in this order:
- Take a snapshot or a full backup, and check you can restore it.
- Bring the current release fully up to date with
sudo apt updateandsudo apt full-upgrade, and reboot if/run/reboot-requiredexists. - Read the target release notes and check free disk space; PPAs and third-party repositories are disabled during the upgrade.
- Run
sudo do-release-upgradeand answer its prompts.
LTS-to-LTS upgrades are offered only after the new release's first point release (.1), and you cannot skip an LTS: 20.04 goes to 22.04 first, then to 24.04. Once done, run lsb_release -a again to confirm the new version. On a fresh server, Ubuntu VPS initial setup covers the hardening steps.
Checking your Ubuntu version on a Bigdomainhost VPS
A Bigdomainhost KVM VPS comes with full root access and Ubuntu 20.04, 22.04 and 24.04 images, in Mumbai (BOM-1) or Delhi NCR (DEL-1). Every method above works on it: log in over SSH and run lsb_release -a or hostnamectl. For a new server, 24.04 has the longest standard support of the three images.
Before a release upgrade, take a snapshot in the control panel; the snapshots and backups docs explain how restore works and how snapshots differ from scheduled off-server backups. If an upgrade leaves SSH unreachable, the out-of-band console in the control panel still gets you in. New to servers? What is a VPS explains the basics. For help, call +91 75994 50220 during IST hours, WhatsApp the same number at any time, or email support@bigdomainhost.com.
Sources (checked )
- Canonical: Ubuntu release cycle
- Ubuntu Server documentation: How to upgrade your release
- Ubuntu Pro Client documentation: What does security-status do?
- Ubuntu Manpages: hostnamectl(1), Ubuntu 24.04
- freedesktop.org: os-release(5)