If you are new to an Ubuntu system, it is essential to check its version before proceeding with any task. Ubuntu releases a new version every six months, whereas LTS (Long Term Support) versions are released every two years and are supported for five years on both desktop and server. On the other hand, standard releases are supported for only nine months. In this article, you will learn how to find your Ubuntu version using the command line or graphical interface. Keep reading to find out!
How to Check Ubuntu Version from the Command Line
You have multiple options to determine the version of Ubuntu installed on your system using different commands.
The information regarding the Linux distribution’s compliance with the Linux Standard Base (LSB) can be viewed using the lsb_release
tool.
To determine the version of your Ubuntu operating system, the recommended approach is to utilize the lsb_release
tool. This utility presents LSB (Linux Standard Base) data pertaining to the Linux distribution and is effective regardless of the Ubuntu version or desktop environment you are utilizing.
To verify the Ubuntu version using the command line, adhere to the steps provided below:
- To access your terminal, you can either click on the terminal icon or use the
Ctrl+Alt+T
keyboard shortcut. - One way to display the Ubuntu version is by using the
lsb_release -a
command.
lsb_release -a
Output:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic
The Description line displays your Ubuntu version. From the displayed output, it is evident that Ubuntu 18.04 LTS is currently in use.
By utilizing the -d
switch, you can exhibit the description line that indicates the version of your Ubuntu instead of presenting all the aforementioned details.
lsb_release -d
The output should look like this:
Output:
Description: Ubuntu 18.04 LTS
Here are some additional commands you can use to verify the version of your Ubuntu system.
Check the Ubuntu version using the /etc/issue
file
To display the system identification text contained in the /etc/issue file, you can use the cat command:
cat /etc/issue
The resulting output will resemble something similar to the following:
Output:
Ubuntu 18.04 LTS \n \l
Check the Ubuntu version using the /etc/os-release
file
The identification data of an operating system is stored in a file called, which is exclusively present in the newer versions of Ubuntu that operate on the system.
For this technique to function, it is necessary to have Ubuntu 16.04 or a more recent version installed.
cat /etc/os-release
The resulting display will resemble the following:
Output:
NAME=”Ubuntu”
VERSION=”18.04 LTS (Bionic Beaver)”
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME=”Ubuntu 18.04 LTS”
VERSION_ID=”18.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=bionic
UBUNTU_CODENAME=bionic
Check the Ubuntu version using the hostnamectl
command
The hostnamectl
command serves a dual purpose of enabling users to both set their system hostname and check their Ubuntu version.
The functionality of this command is limited to Ubuntu 16.04 or later releases:
hostnamectl
Output:
Static hostname: trioguide
Icon name: computer-vm
Chassis: vm
Machine ID: f1ce51f447c84509a86afc3ccf17fa24
Boot ID: 2b3cd5003e064382a754b1680991040d
Virtualization: kvm
Operating System: Ubuntu 18.04 LTS
Kernel: Linux 4.15.0-22-generic
Architecture: x86-64
Check Ubuntu Version in the Gnome Desktop
In Ubuntu 18.04 (Bionic Beaver), Gnome serves as the default desktop environment, whereas in previous versions of Ubuntu, Unity held the position of default desktop environment.
If you’re using Gnome, you can follow the instructions below to verify the version of Ubuntu you’re running:
- To access the system settings window, simply click on the Settings icon depicted in the image below.
- To access the Details tab, simply click on it within the system settings window.
Underneath the orange Ubuntu logo, the version of your Ubuntu operating system will be displayed.
Conclusion
Instructed earlier was the process of discovering the Ubuntu version currently operating on your system. For additional insights into Ubuntu releases, please visit the Ubuntu Releases page. Do not hesitate to ask any queries by dropping a comment below.