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.
You can swap the -a command with -d to print only the version of the distro you’re using.
lsb_release -d
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.
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
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
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
Step 2: Once installed, type neofetch in the terminal and hit enter.
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.
Step 2: Click on About and you’ll be able to see all the relevant information you need.