How To Check Ubuntu Version?

Ubuntu is the most popular end-user and server Linux distribution. Ubuntu is released regularly every 6 months. This means ubuntu has different versions. In every new version, some features become obsolete and some new features are added. In order to work current Ubuntu system, we may need to know the Ubuntu version. There are different ways to check or display the Ubuntu version. In this tutorial, we will learn how to check and display the Ubuntu version via command line, bash, and GUI.

Recent Ubuntu Versions and Releases

As a regularly updated Linux distribution, Ubuntu has the following long version list of releases. Some releases are named LTS which is “Long Term Support“. These LTS versions are supported for long times like 8-10 years. Other version’s support ends with the new or next Ubuntu release which is very short like 6 months.

Recent Ubuntu Versions and Releases

Check Ubuntu Version with lsb_release Command via Command Line

One of the most popular ways to check the Ubuntu version is using the lsb_release command. The lsb_release is created in order to print distribution-specific information. It is provided with most of the Linux distributions. In this case, we will use the lsb_release command with the -a option. The LSB name comes from the “Linux Standard Base”. Run following command in bash terminal.

lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 20.10
Release:    20.10
Codename:    groovy

From the output we can see the following Ubuntu version information is provided.

  • Distributer ID is the distribution name which is “Ubuntu” in this case.
  • Description is the distributions name with the Ubuntu version which is “Ubuntu 20.10“.
  • Release is the Ubuntu version which do not contains distribution name.
  • Codename is the release version human readable name which is “groovy” in this case.
READ  Linux cut Command Tutorial

If you only need the description part which will print the distribution name and version the -d option can be used.

lsb_release -d

Check Ubuntu Version with /etc/issue File via Command Line

The /etc/issue file contains the distirbution name and version information in most of the Linux distributions. In Ubuntu we can print this file into the terminal with the cat command which lists the Ubuntu version.

cat /etc/issue
Ubuntu 20.10 \n \l

This output contains \n and \l characters which are not related with the version information.

Check Ubuntu Version with /etc/os-release File via Command Line

Most of the Linux distributions provide the /etc/os-release file which contains detailed information about the current distributions and versions. We can print /etc/os-release file to the terminal in order to get Ubuntu version information.

cat /etc/os-release
NAME="Ubuntu"
VERSION="20.10 (Groovy Gorilla)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.10"
VERSION_ID="20.10"
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=groovy
UBUNTU_CODENAME=groovy

The version of the Ubuntu distribution is provided via the VERSION line.

Check Ubuntu Version with hostnamectl Command via Command Line

The hostnamectl command can be used to list and set hostname and related information in Linux. The hostnamectl command also used to list some basic information about the Linux system like Machine ID, Operating System.

hostnamectl
Static hostname: ubuntu
Icon name: computer-vm
Chassis: vm
Machine ID: 295c2cf105a140e5ab505a9e74ff560e
Boot ID: 50c6ada362e44ec595da88ee5e5fcfc5
Virtualization: vmware
Operating System: Ubuntu 20.10
Kernel: Linux 5.8.0-38-generic
Architecture: x86-64

The Operating System line provides the Ubuntu version information. Also Architecture line lists current operating system architecture which is x86-64.

Check Ubuntu Version with GNOME Desktop

GNOME is the default desktop environment provided with the Ubuntu. The current version of the Ubuntu can be displayed by using GNOME desktop environment via GUI way.

READ  Linux xclip Command Tutorial

First open the Settings via the upper right corner of the GNOME Desktop like below.

Open GNOME Desktop Settings

From the Settings navigate to the About screen in the left pane. In the About page the OS Name line displays the Ubuntu version.

Ubuntu Version via Settings About Screen

Check Ubuntu Version with KDE (Plasma) Desktop

Another popular desktop environment is KDE (Plasma) Desktop. The Ubuntu version can be displayed via the System Information in KDE.

First from the start menu type “system information” like below and open the System Information.

Open System Information In KDE

In the System Information screen, we can see that the current Ubuntu version is displayed as Kubuntu 20.10. Kubuntu comes from the KDE Ubuntu which is a variation of the Ubuntu where the KDE is installed.

Check Ubuntu Version via KDE System Information

Leave a Comment