check the ubuntu version

Check The Ubuntu Version You’re Running

This tutorial will show you how to check what version of Ubuntu you’re running/using. We’ll show you a method of doing it via the command-line interface (CLI) and one via the graphical user interface (GUI).

TL;DR: Just use the lsb_release -a command in a Terminal.

Let’s jump straight to the CLI method:

How to check Ubuntu version via Terminal

Here are the step-by-step instructions:

Step 1: Open Terminal

You can open Terminal by using a keyboard shortcut: CTRL + ALT + T. Press these 3 keys and a Terminal window will open up.

(Optional) other methods you can use to open Terminal:

  1. Open it via the Activities menu, just type in “terminal” and click on the app.
  2. By right-clicking in any directory (including Desktop) and choosing the “Open in Terminal” option.
  3. If you’re using a server, just SSH into the server.

Step 2: Use the lsb_release command

Run the following command:

lsb_release -a

To get the details about the version of Ubuntu you’re running. Depending on the version you’re using, the results of the command above should be similar to:

Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
  1. The first line (Distributor) is the name of the distro
  2. The second line (Description) is the version of Ubuntu you’re running (the result you need)
  3. The third line (Release) is the release number of the distro
  4. The fourth line (Codename) is the codename of the distro

And that’s it. Now you know what version of Ubuntu you’re running.

If you want to get the second line only (Description) you can run the following command:

lsb_release -d

If you want to get the third line only (Release), without the word “Release: “, use the following command:

lsb_release -r -s

This command will output “22.04”, it’s useful for scripts.

(Optional) Other commands you can use:

OR Use hostnamectl to check the Ubuntu version

Run the following command:

hostnamectl

It should give you a detailed result of the system you’re running. Here’s a sample result:

Static hostname: ubuntu-s-1vcpu-512mb-10gb-fra1-01
Icon name: computer-vm
Chassis: vm
Machine ID: 4203d8f7b74827aa91039efe63245afc
Boot ID: ec76f93adc0f465da8be99d9e77d46a6
Virtualization: kvm
Operating System: Ubuntu 22.04.1 LTS
Kernel: Linux 5.15.0-41-generic
Architecture: x86-64

The line you need here is the 7th line, Operating System.

OR Use cat /etc/*ease

Run the following command to get another detailed result of the system you’re using:

cat /etc/*ease

You should get a result similar to:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 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

You can get the version of Ubuntu from multiple lines here.

If you want to check the Ubuntu version graphically, using your desktop environment, check the instructions below.

How to check Ubuntu version via GUI

You just need to find the Settings -> About page. Here are step-by-step instructions on how to check the Ubuntu version you’re using via the graphical user interface:

Step 1: Go to Show Applications

Click on the icon in the bottom left corner or click the “Windows” key:

show applications

Step 2: Go to Settings

Once you open the Show Applications menu, you can find the Settings app there:

settings app

If you don’t see it, you can go to the other pages, or you can type in “settings” in the search field:

settings serach

Once you find the Settings app icon, click on it and the Settings window will appear.

There are other ways to get to the Settings app too, use whatever method you prefer.

Step 3: Go to the About tab

Scroll down in the left sidebar and click on the About tab:

settings window

You can also go straight to the About (Settings) tab by typing in “about” in the Show Applications window:

about show applications

Step 4: Check the Ubuntu version

And finally, once you’re in the About tab/window, you can check what version of Ubuntu you’re using:

about OS name

You can see the version from the OS Name line.

And that’s all. Now you know how to check your Ubuntu version via the CLI and GUI.

A few notes about checking the Ubuntu version

It’s preferred to use the CLI method as it doesn’t depend on what desktop environment you’re using. The command will work on any distro. The GUI instructions won’t work on just about any distro, it will only work on distros with GNOME. However, the instructions are still pretty similar.

I know this tutorial is pretty long and detailed when it’s only a single command to check the Ubuntu version, but the single command is included above, near the top of the tutorial. Everything else is just a bonus, to help out beginners and to provide more options.

I used Ubuntu 22.04 for this tutorial, so the results will vary depending on what version you are using. The commands and instructions are still the same, no matter the version you are using.

Leave a comment

Your email address will not be published.