How to Check Your Ubuntu Version

By 

•

Updated on

•

6 min read

Terminal commands used to check the 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 the Legacy add-on extends it to 15 years. Interim releases are supported for nine months.

This guide covers several ways to check your Ubuntu version from the command line.

Quick Reference

MethodCommand
Recommendedcat /etc/os-release
Distribution summarylsb_release -d
Version number onlylsb_release -rs
One-line bannercat /etc/issue
Hostname and OS infohostnamectl
Kernel versionuname -r

Using lsb_release

The lsb_release command displays Linux Standard Base (LSB) information about the distribution. It is available by default on both desktop and server installations.

To display full release information:

Terminal
lsb_release -a
output
Distributor ID:	Ubuntu
Description:	Ubuntu 26.04.1 LTS
Release:	26.04
Codename:	resolute

The Description line shows the full version, including the point release (26.04.1). The Release line shows only the base version. Point releases are updated snapshots of the same LTS release, so a system that reports 26.04.1 is still running Ubuntu 26.04.

To display only the description:

Terminal
lsb_release -d
output
Description:	Ubuntu 26.04.1 LTS

To print a single value without the label, combine an option with -s. For example, the following command prints only the release number:

Terminal
lsb_release -rs
output
26.04

Use -cs to print the codename (resolute) instead. The short form is useful in scripts, for example when you add an APT repository that needs the release codename.

Info
Regular Ubuntu installs include lsb_release, but Docker containers and other minimal images usually do not. In those environments, read /etc/os-release instead, or install the lsb-release package.

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:

Terminal
cat /etc/os-release
output
PRETTY_NAME="Ubuntu 26.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="26.04"
VERSION="26.04.1 LTS (Resolute Raccoon)"
VERSION_CODENAME=resolute
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=resolute
LOGO=ubuntu-logo

To extract only the version string, use grep :

Terminal
grep PRETTY_NAME /etc/os-release
output
PRETTY_NAME="Ubuntu 26.04.1 LTS"

For scripts, use the VERSION_ID field. It holds only the base version (26.04) and does not change when a new point release comes out.

Using /etc/issue

The /etc/issue file contains a short system identification banner. Use the cat command to display it:

Terminal
cat /etc/issue
output
Ubuntu 26.04.1 LTS \n \l

The \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:

Terminal
hostnamectl
output
 Static hostname: ubuntu
       Icon name: computer-vm
         Chassis: vm 🖴
      Machine ID: 45c238ad5c9746c7a8546ad02077864a
         Boot ID: d41efe7c50cb4d7f8c297147a1b3996b
  Virtualization: qemu
Operating System: Ubuntu 26.04.1 LTS
          Kernel: Linux 7.0.0-31-generic
    Architecture: arm64
 Hardware Vendor: QEMU
  Hardware Model: QEMU Virtual Machine
Hardware Version: virt-11.1
Firmware Version: edk2-stable202408-prebuilt.qemu.org
   Firmware Date: Tue 2024-08-13
    Firmware Age: 2y 3month 3d

The 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:

Terminal
uname -r
output
7.0.0-31-generic

To see all system information:

Terminal
uname -a

Checking from the Desktop

If you are running Ubuntu with the default GNOME desktop, open Settings and go to System > About. On releases older than Ubuntu 24.04, the About section is at the bottom of the Settings sidebar. The Ubuntu version and hardware details are displayed there.

Recent Ubuntu Releases

VersionCodenameRelease DateStatus
Ubuntu 26.10Stonking StingrayOctober 2026Latest interim, support ends July 2027
Ubuntu 26.04Resolute RaccoonApril 2026Current LTS (26.04.1), standard support until May 2031
Ubuntu 25.10Questing QuokkaOctober 2025End of life since July 2026
Ubuntu 24.04Noble NumbatApril 2024LTS, standard support until 2029
Ubuntu 22.04Jammy JellyfishApril 2022LTS, standard support until 2027
Ubuntu 20.04Focal FossaApril 2020Standard support ended, Ubuntu Pro available

Ubuntu 25.10 no longer receives security updates. If you are still running it, follow our guide on how to upgrade to Ubuntu 26.04 .

Troubleshooting

lsb_release: command not found
The lsb-release package is not installed. Regular Ubuntu installs include it, so you will usually see this error inside a Docker container or another minimal image. Read /etc/os-release instead, or install the lsb-release package. In minimal Docker images, hostnamectl is usually unavailable, so use /etc/os-release.

Different commands show different versions
Each command reports a slightly different value. The Release line of lsb_release and the VERSION_ID field show the base version (26.04). The Description line, PRETTY_NAME, and /etc/issue include the point release (26.04.1). The uname -r command shows the kernel version, a separate number that does not follow the Ubuntu release. After an upgrade, it keeps showing the old kernel until you reboot. Inside a container, /etc/os-release describes the container image, and uname -r shows the kernel of the host.

FAQ

What is the latest Ubuntu version?
The latest release is Ubuntu 26.10 (Stonking Stingray), released in October 2026 and supported until July 2027. The latest LTS release is Ubuntu 26.04 LTS (Resolute Raccoon), now at point release 26.04.1, with standard support until May 2031.

How do I check if my Ubuntu is 32-bit or 64-bit?
Run dpkg --print-architecture. It returns amd64 on 64-bit Intel and AMD systems and arm64 on 64-bit ARM systems. Current Ubuntu releases do not install on 32-bit PCs, so you will see i386 only on very old systems.

What is the difference between LTS and interim releases?
LTS releases come out every two years and receive five years of standard support. Ubuntu Pro extends that coverage to ten years. 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. For more ways to find it, see how to check the kernel version in Linux .

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. On an LTS release, the upgrade tool offers only the next LTS by default, so you will not be offered 26.10 on Ubuntu 26.04. For the full process, see how to upgrade to Ubuntu 26.04 . 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

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

View author page