How to Check Ubuntu Version

How to Check Ubuntu Version

·

2 min read

Ubuntu is one of the most popular Linux distributions available today. With new versions released regularly, it's important to know which version of Ubuntu you're currently running to ensure compatibility with software and get updates. Checking your Ubuntu version is easy, just requiring a simple terminal command.

Here are a few methods to check which version of the Ubuntu operating system you have installed.

Use the lsb_release Command

The simplest way to check your Ubuntu version is by using the lsb_release command in the terminal. Here's how:

  1. Open the Terminal application on your Ubuntu desktop. You can find it by searching for "terminal" on the dash.

  2. Type the following command and hit enter:

     lsb_release -a
    
  3. The output will clearly show the Ubuntu version codename, release number, and description:

     No LSB modules are available.
     Distributor ID: Ubuntu
     Description: Ubuntu 20.04.5 LTS
     Release: 20.04
     Codename: focal
    

This outputs details on both the Ubuntu version number (20.04) and codename (focal). The codename for each Ubuntu release stays consistent even with version updates, while the number increases with major changes.

Check System Settings

You can also check the About section of System Settings:

  1. Open System Settings from the desktop app menu.

  2. Go to the Details panel.

  3. Look for the Ubuntu version under the OS Type. This will show the version number and codename.

This method provides an easy graphical way to find your Ubuntu version details without using terminal commands.

Use the /etc/os-release File

The Ubuntu version is also available in the /etc/os-release system file. View it with:

cat /etc/os-release

The file contents include these version details:

NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
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"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

The key details like version number and codename are easy to spot here.

Check on the Login Screen

When logging into Ubuntu, the version number and codename are displayed at the bottom of the login prompt. If you reboot your computer, you can view these details on the Ubuntu loading screen.

This makes it easy to quickly check the Ubuntu build when rebooting without logging fully into the desktop environment.

Conclusion

There are a few handy ways to check which version of the Ubuntu Linux operating system you have installed, both through the terminal and graphical interface. Knowing the Ubuntu version number and codename allows you to understand what release channel it's on, whether it's still supported, and compatibility with other software. Keeping Ubuntu up-to-date is also important for getting the latest security patches.