How to Check Your Ubuntu Version

Knowing which Ubuntu version is running on your system helps you install the right packages, follow version-specific documentation, and apply the correct security patches.
Ubuntu publishes a new release every six months. LTS (Long Term Support) releases come out every two years and receive security updates for five years. Ubuntu Pro can extend coverage to ten years, and Canonical offers longer coverage with the Legacy add-on. Interim releases are supported for nine months.
This guide covers several ways to check your Ubuntu version from the command line.
Quick Reference
| Method | Command |
|---|---|
| Recommended | cat /etc/os-release |
| Distribution summary | lsb_release -d |
| One-line banner | cat /etc/issue |
| Hostname and OS info | hostnamectl |
| Kernel version | uname -r |
Using lsb_release
The lsb_release command displays Linux Standard Base (LSB) information about the distribution. It is available by default on most Ubuntu desktop installations.
To display full release information:
lsb_release -aNo LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.2 LTS
Release: 24.04
Codename: nobleThe version is shown in the Description line. To display only the description:
lsb_release -dDescription: Ubuntu 24.04.2 LTSlsb_release is not available (common on minimal server installs), install it with sudo apt install lsb-release, or use /etc/os-release instead.Using /etc/os-release
The /etc/os-release file contains operating system identification data in a key-value format. It is present on every supported Ubuntu release and does not require any additional packages:
cat /etc/os-releasePRETTY_NAME="Ubuntu 24.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.2 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logoTo extract only the version string, use grep :
grep PRETTY_NAME /etc/os-releasePRETTY_NAME="Ubuntu 24.04.2 LTS"Using /etc/issue
The /etc/issue file contains a short system identification banner. Use the cat
command to display it:
cat /etc/issueUbuntu 24.04.2 LTS \n \lThe \n and \l tokens are placeholders for the hostname and terminal line. They are replaced with actual values on the login screen.
Using hostnamectl
The hostnamectl command displays the hostname and other system information, including the operating system version:
hostnamectl Static hostname: ubuntu
Icon name: computer-vm
Chassis: vm 🖴
Machine ID: a92099e30f704d559adb18ebc12ddac4
Boot ID: 4224ba0d5fc7489e95d0bbc7ffdaf709
Virtualization: qemu
Operating System: Ubuntu 24.04.2 LTS
Kernel: Linux 6.8.0-51-generic
Architecture: x86-64The Ubuntu version is shown on the “Operating System” line.
Using uname
The uname command does not show the Ubuntu version directly. It only displays the kernel version, so use it for kernel details rather than release identification:
uname -r6.8.0-51-genericTo see all system information:
uname -aChecking from the Desktop
If you are running Ubuntu with the default GNOME desktop, open Settings and scroll down to the About section (or System > About on Ubuntu 24.04). The Ubuntu version and hardware details are displayed there.
Ubuntu Version History
| Version | Codename | Release Date | Status |
|---|---|---|---|
| Ubuntu 24.04 | Noble Numbat | April 2024 | Current LTS |
| Ubuntu 23.10 | Mantic Minotaur | October 2023 | End of life |
| Ubuntu 22.04 | Jammy Jellyfish | April 2022 | LTS, standard support until 2027 |
| Ubuntu 20.04 | Focal Fossa | April 2020 | Standard support ended, Ubuntu Pro available |
| Ubuntu 18.04 | Bionic Beaver | April 2018 | Standard support ended |
Troubleshooting
lsb_release: command not found
The lsb-release package is not installed. This is common on minimal or server installations. Install it with sudo apt install lsb-release, or use /etc/os-release instead.
Different commands show different versions
This can happen after a partial upgrade. Run sudo apt update && sudo apt full-upgrade to complete the upgrade, then check again.
FAQ
How do I check if my Ubuntu is 32-bit or 64-bit?
Run dpkg --print-architecture. It returns amd64 for 64-bit or i386 for 32-bit.
What is the difference between LTS and interim releases?
LTS releases come out every two years and are supported for five years. Ubuntu Pro can extend coverage to ten years, while interim releases come out every six months and are supported for nine months.
How do I check which kernel my Ubuntu is running?
Run uname -r to display the kernel version. The kernel version does not always match the Ubuntu release number.
How do I upgrade to a newer Ubuntu version?
Run sudo do-release-upgrade. On desktop systems, the Software Updater will also prompt you when a new release is available. Always back up your system before upgrading.
Conclusion
You can check your Ubuntu version using /etc/os-release, lsb_release -d, /etc/issue, or hostnamectl. For most systems, cat /etc/os-release is the most reliable method since it requires no extra packages. If you also manage Debian
servers, the same methods apply there with minor differences.
Tags
Linuxize Weekly Newsletter
A quick weekly roundup of new tutorials, news, and tips.
About the authors

Dejan Panovski
Dejan Panovski is the founder of Linuxize, an RHCSA-certified Linux system administrator and DevOps engineer based in Skopje, Macedonia. Author of 800+ Linux tutorials with 20+ years of experience turning complex Linux tasks into clear, reliable guides.
View author page