Skip to content

How to check the Ubuntu version?

  • by
  • 4 min read

One of the best things about Linux is the hundreds of distros and flavours the OS is available for users to pick. You could be looking to use Linux for a particular workflow, and chances are you’ll find a distro built for you. 

However, the downside of having so many options to chose from is that you might not even know which version of Linux you’re running. In this article, we’re going over a few ways you can find out what version of Ubuntu you’re using. 

Also read: How to enable SSH on Ubuntu?


How to check the Ubuntu version using the terminal?

There are a bunch of commands you can use to fetch various information about your Ubuntu installation. 

Using the lsb_release

The lsb_release command will show you the Linux Standard Base, otherwise known as LSB, information about the distro you’re running.

lsb_release -a

The output will look something like this.

How to check the Ubuntu version? | Candid.Technology

You can swap the -a command with -d to print only the version of the distro you’re using.

lsb_release -d
How to check the Ubuntu version? | Candid.Technology

Using the /etc/issue file

In most Linux distros, the issue file saved in the /etc directory contains system identification text. You can use the cat command to view this file. 

cat /etc/issue

The output will look something like this. 

How to check the Ubuntu version? | Candid.Technology

Using the /etc/os-release file

As you can probably guess by the name, the os-release file contains important OS identification data for your distro. 

cat /etc/os-release
How to check the Ubuntu version? | Candid.Technology

Do keep in mind that this command will only work on Ubuntu 16.04 or newer. 


Using the hostnamectl command

The hostnamectl command allows you to change your machine’s hostname, but you can also use it to fetch important distro information. Once again, this command will only work on Ubuntu 16.04 or newer. 

hostnamectl
How to check the Ubuntu version? | Candid.Technology

Also read: How to install themes in Ubuntu?


How to check the Ubuntu version using the neofetch utility?

The command-line utility neofetch prints out all the relevant system information about your distro, including the desktop environment, straight in your terminal with just one command. 

Step 1: Install neofetch using the following command.

sudo apt install neofetch
How to check the Ubuntu version? | Candid.Technology

Step 2: Once installed, type neofetch in the terminal and hit enter. 

How to check the Ubuntu version? | Candid.Technology

Also read: Top 11 Ubuntu themes


How to check the Ubuntu version using the Gnome desktop?

Since Ubuntu 18.04, Gnome is the default desktop environment versus the previous versions, which used Unity by default. 

Simply follow these steps to look up your distro’s details.

Step 1: Open the system settings dialogue by clicking on the settings icon in the top right. Click on the settings icon to proceed.

How to check the Ubuntu version? | Candid.Technology

Step 2: Click on About and you’ll be able to see all the relevant information you need.

How to check the Ubuntu version? | Candid.Technology

Also read: How to install the Unifi controller on Ubuntu?

Yadullah Abidi

Yadullah Abidi

Yadullah is a Computer Science graduate who writes/edits/shoots/codes all things cybersecurity, gaming, and tech hardware. When he's not, he streams himself racing virtual cars. He's been writing and reporting on tech and cybersecurity with websites like Candid.Technology and MakeUseOf since 2018. You can contact him here: yadullahabidi@pm.me.

>