Categories: Ubuntu

How to check which Ubuntu Version you are on

This guide will get right to the point and show you how to check your ubuntu version. For fast results please open a terminal, we will use the terminal for all actions to get quick information. After your terminal is open you should have a window like this open.
Sponsored

Ubuntu Linux Terminal

The first command you can try is lsb_release. Use the -a flag to see all the outputs.

linuxhint@u22:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:       22.04
Codename:       jammy

lsb_release-a command output on Ubuntu

You can see in the above code and screen shot that the version of Ubuntu is displayed. You can get this into a variable in bash with a simple grep and awk command as shown below:

linuxhint@u22:~$ VERSION=`lsb_release -a | grep Description | awk -F‘:’ ‘{ print $2 }’ | xargs`
linuxhint@u22:~$ echo $VERSION
Ubuntu 22.04.1 LTS

In the above code we use grep to the find Description, awk to get the second field after the colon, and xargs to stream the leading whitespace.

Sponsored

Also note you can use the command $ cat /etc/os-release

cat /etc/os-release

uname is a popular command, but it may not give what you are searching for in this use case.

Conclusion

Use lsb_release command to quickly find the Ubuntu version from the terminal in Ubuntu, lsb_release is the best command to find distribution specific information from the terminal.

Ubuntu Server Admin

Recent Posts

Canonical Releases Ubuntu 25.04 Plucky Puffin

The latest interim release of Ubuntu introduces “devpacks” for popular frameworks like Spring, along with…

2 days ago

Ubuntu 25.04 (Plucky Puffin) Released

Ubuntu 25.04, codenamed “Plucky Puffin”, is here. This release continues Ubuntu’s proud tradition of integrating…

3 days ago

Extended Security Maintenance for Ubuntu 20.04 (Focal Fossa) begins May 29, 2025

Ubuntu released its 20.04 (Focal Fossa) release 5 years ago, on March 23, 2020. As…

3 days ago

Ubuntu 20.04 LTS End Of Life – activate ESM to keep your fleet of devices secure and operational

Focal Fossa will reach the End of Standard Support in May 2025, also known as…

4 days ago

Ubuntu MATE 25.04 Release Notes

Ubuntu MATE 25.04 is ready to soar! 🪽 Celebrating our 10th anniversary as an official…

4 days ago

Ubuntu Weekly Newsletter Issue 887

Welcome to the Ubuntu Weekly Newsletter, Issue 887 for the week of April 6 –…

6 days ago