How to Check Ubuntu Version

Ubuntu is one of the most popular Linux distributions in the world, with Canonical releasing a new standard version every six months and a Long Term Support (LTS) version every two years. When you are installing new software, following online tutorials, adding third-party repositories, or troubleshooting a bug, knowing your exact Ubuntu version number and codename (like “Jammy Jellyfish” or “Focal Fossa”) is absolutely essential to ensure compatibility.

Why the Version Matters

Unlike Windows, where a single piece of software might run perfectly on Windows 10 and Windows 11, Linux software is often compiled against specific system libraries that change between releases. If a tutorial tells you to add an apt repository for Ubuntu 20.04 (Focal), but you are running Ubuntu 22.04 (Jammy), running that command will likely break your package manager. Always verify your version before making system-level changes.

Method 1: Using the lsb_release Command (The Best Method)

The Linux Standard Base (LSB) command is the most reliable way to check your version because it provides clean, human-readable output that includes both the release number and the codename.

  1. Open your terminal application.
  2. Type the following command and press Enter:
    lsb_release -a

The output will look something like this:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy

The Description line gives you the full title, including point releases (like the .3 in 22.04.3). The Codename is what you need when adding software repositories (e.g., adding the word “jammy” to your sources list).

Method 2: Checking the /etc/os-release File

If you are working on a highly customized or minimal Docker container where the lsb_release tool is not installed, you can read the system’s identification file directly. This file is standard across almost all modern systemd-based Linux distributions.

  1. In the terminal, run the following command:
    cat /etc/os-release

This prints out several variables, including PRETTY_NAME="Ubuntu 22.04.3 LTS" and VERSION_CODENAME=jammy. This method is incredibly useful if you are writing a bash script that needs to detect the OS version automatically, as you can easily parse these variables.

Method 3: Using the GUI (For Desktop Users)

If you are using Ubuntu Desktop and prefer not to use the terminal, you can find the version information in the system settings.

  1. Click the system menu in the top-right corner of the screen (where the battery and network icons are).
  2. Select Settings.
  3. Scroll down the left-hand sidebar to the very bottom and click on About.
  4. In the main window, look for the OS Name field. It will display your exact Ubuntu version (e.g., “Ubuntu 22.04 LTS”).

Troubleshooting Common Confusion

When checking versions, understand the difference between LTS and non-LTS releases:

  • LTS (Long Term Support): Releases ending in .04 in even years (e.g., 20.04, 22.04, 24.04). These are supported for five years and are highly recommended for servers and stability.
  • Interim Releases: Releases ending in .10, or .04 in odd years (e.g., 23.04, 23.10). These are supported for only nine months. If you check your version and see 23.10, you must upgrade soon, as you will stop receiving critical security updates.

By accurately identifying your Ubuntu version, you can confidently navigate tutorials and maintain a stable, secure operating system.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.