Skip to main content
0 reactions

How to Check Your Ubuntu Version

Featured card for How to Check Your Ubuntu Version. A terminal window ticks off lsb_release -a and its answers: Ubuntu 26.04.1 LTS, release 26.04 and the code name resolute.
Check your Ubuntu version with lsb_release -a.

Many install guides work only on certain Ubuntu releases, so the first thing to know is which version you’re running. On Ubuntu, one command shows it: lsb_release -a.

Every command and output on this page is real, from Ubuntu 26.04 LTS.

Syntax

SyntaxBash
lsb_release [options]
  • lsb_release: prints information about the Ubuntu release you’re running. On Ubuntu 26.04 it reads it from the file /etc/os-release.
  • [options]: what to show. -a shows everything: the distributor, the description, the release number and the code name. -d, -r and -c show one of them each, and -s leaves out the labels.

The options come from lsb_release’s manual page (opens in a new tab) for Ubuntu 26.04.

Step 1: Check Your Ubuntu Version

Open a terminal on Ubuntu and run:

Ubuntu TerminalBash
lsb_release -a
OutputPlain text
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 26.04.1 LTS
Release:        26.04
Codename:       resolute

Here’s what each line tells you:

  • Distributor ID: the Linux distribution, Ubuntu.
  • Description: the full name, with the point release (26.04.1) and LTS when it’s a long-term support release.
  • Release: the version number. Ubuntu numbers its versions by the year and month they came out, so 26.04 is April 2026.
  • Codename: the release’s code name. Software repositories, such as the PostgreSQL one, use it to give you the packages built for your release.

The first line, No LSB modules are available., is normal, and you can ignore it.

FAQ

What does LTS mean?

Long-term support. Ubuntu releases a new version every six months, and every two years one of them is an LTS release with 5 years of standard security maintenance. The releases in between get 9 months of updates. For a server, pick an LTS release.

How do I show just the code name?

Add -c for the code name and -s to leave out its label:

Ubuntu TerminalBash
lsb_release -cs
OutputPlain text
resolute

Do I need sudo to check the version?

No. lsb_release only reads information, so any user can run it.

Conclusion

lsb_release -a shows your Ubuntu version in one command: its release number, its full name and its code name. Check it before you follow a guide that supports only some releases, such as How to Install PostgreSQL 19 on Ubuntu.

Additional Resources

0 comments