zaro

How to Check Your Ubuntu Version

Published in Ubuntu Version 4 mins read

Knowing the specific version of Ubuntu you are running is crucial for various reasons, including software compatibility, system updates, and troubleshooting. Fortunately, Ubuntu provides straightforward ways to find this information, both through its graphical user interface (GUI) and the command line.

Checking Your Ubuntu Version via GUI (Graphical Method)

The graphical interface offers an intuitive path to discover your Ubuntu version, ideal for users who prefer visual navigation.

  1. Open Settings: Begin by opening the Settings application. You can typically find it in your applications menu or by clicking the gear icon in the system tray.
  2. Navigate to Details: In the Settings window, look for and select the "Details" option. In some slightly different desktop environments or newer versions, this might be labeled "About."
  3. Locate Ubuntu Version: Once you are in the "Details" window, the Ubuntu version will be clearly displayed under the "About" topic. This section typically provides a summary of your system's specifications, including the Ubuntu release name and version number.

This method is quick, easy to follow, and doesn't require any technical commands, making it accessible for all users.

Checking Your Ubuntu Version via Command Line

For those who prefer or need to use the terminal, Ubuntu offers several robust command-line tools to fetch detailed version information. These methods are particularly useful for server environments or when scripting system checks.

Using lsb_release -a

The lsb_release command is part of the Linux Standard Base (LSB) and provides distribution-specific information. The -a flag displays all available information.

  • How to use: Open your terminal (usually by pressing Ctrl + Alt + T) and type:

    lsb_release -a
  • What it shows: This command will output details such as Distributor ID, Description, Release (your version number), and Codename (the release name).

    Example Output:

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

Using /etc/os-release

The /etc/os-release file contains operating system identification data. It's a widely adopted standard for Linux distributions.

  • How to use: View the contents of this file using the cat command:

    cat /etc/os-release
  • What it shows: You'll find key-value pairs with information like PRETTY_NAME, NAME, VERSION_ID, VERSION, ID, and VERSION_CODENAME.

    Example Output:

    PRETTY_NAME="Ubuntu 22.04.3 LTS"
    NAME="Ubuntu"
    VERSION_ID="22.04"
    VERSION="22.04.3 LTS (Jammy Jellyfish)"
    VERSION_CODENAME=jammy
    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=jammy

Using /etc/issue or /etc/lsb-release

These files offer simpler, sometimes less detailed, ways to check the version.

  • /etc/issue: Contains system identification information, often displayed before login.

    cat /etc/issue

    Example Output: Ubuntu 22.04.3 LTS \n \l

  • /etc/lsb-release: An older file that holds LSB-specific information, often similar to lsb_release -a but as a static file.

    cat /etc/lsb-release

    Example Output:

    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=22.04
    DISTRIB_CODENAME=jammy
    DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"

Quick Reference Table for Command Line Methods

Command Description Key Information Displayed
lsb_release -a Provides detailed LSB-compliant distribution info. Release number, codename, description.
cat /etc/os-release Shows OS identification data in key-value pairs. Pretty name, version ID, codename.
cat /etc/issue Displays a short system identification string. Often just the version number and LTS status.
cat /etc/lsb-release Displays LSB information from a static file. Release number, codename, description.

Why Knowing Your Ubuntu Version Matters

Identifying your Ubuntu version is more than just curiosity. It impacts:

  • Software Compatibility: Different Ubuntu versions support different software packages and libraries.
  • System Updates: Knowing your version ensures you apply the correct security patches and feature updates.
  • Troubleshooting: When seeking help online or reporting bugs, providing your exact Ubuntu version is usually the first piece of information requested.
  • End-of-Life (EOL) Status: Ubuntu releases have a defined support lifecycle. Knowing your version helps you understand if your system is still receiving updates.

By utilizing these methods, you can quickly and accurately determine your Ubuntu version, empowering you to better manage and understand your operating system.