howtouselinux

4 Ways to check Ubuntu Version

Table of Contents

How to check the Ubuntu version is a commonly asked question during a Linux job interview. Ubuntu is an open-source operating system. There are various Ubuntu versions available for their users.

In this article, we will mostly focus on the command line methods to check the Ubuntu version because in Ubuntu. CLI is preferred over GUI as it provides more control over the OS.

Understanding Ubuntu OS

Ubuntu is an open source software platform that runs everywhere from the smartphone, the tablet and the PC to the server and cloud. Designed for efficiency, Ubuntu delivers both a rich client experience as well as a simple platform to build on top of. It’s also great for developers, with no need to install a separate SDK.

Ubuntu runs everywhere from mainframes at the world’s largest organizations, to desktops in homes all over the world, to smart devices on your wrist or in your pocket. Plus Ubuntu offers full support options for commercial users of Ubuntu Open Stack running workloads on public clouds such as Amazon Web Services, Microsoft Azure and Google Cloud Platform.

Benefits of using Ubuntu

Ubuntu is a Linux-based operating system that offers several benefits over other operating systems, such as Windows. Ubuntu is free and open source, which means you can customize it to your needs, and there are many support forums and resources available online.

  • – It’s free!
  • – Ubuntu is very user-friendly and easy to use.
  • – Ubuntu includes a wide range of software that you can use right out of the box.
  • – Ubuntu is secure and includes features to protect your privacy.
  • – Ubuntu is regularly updated with new features and security updates.

 

4 Commands to Check Ubuntu Version

The following commands can be used to get the Ubuntu version.

  • Check Ubuntu version with uname -a
  • Get Ubuntu version with cat /proc/version
  • Find Ubuntu version with cat /etc/os-release
  • Check Ubuntu version with lsb_release -a

 

Understanding Ubuntu version

RHEL, Fedora, Arch, CentOS, Ubuntu, Debian, OpenSUSE, Suse all are basic names of Linux distribution. Knowing the name and version of our Linux distribution can be very helpful for many patches of security.

We can get all the Ubuntu release from here.  https://wiki.ubuntu.com/Releases

Version Release End of Standard Support End of Life
Ubuntu 21.10 October 14, 2021 July 2022 July 2022
Ubuntu 20.04.3 LTS August 26, 2021 April 2025 April 2030
Ubuntu 20.04.2 LTS February 4, 2021 April 2025 April 2030

 

Ubuntu version release lifecycle

Releases of Ubuntu are versioned by the year and month of delivery – for example, Ubuntu 21.10 was released in October 2021.

There are 2 types of Ubuntu releases: Interim and LTS. Each Ubuntu LTS is maintained for 10 years total: 5 years of standard support + 5 years of ESM. Interim releases are maintained for 9 months.

LTS or ‘Long Term Support’ releases are published every two years in April. LTS releases are the ‘enterprise grade’ releases of Ubuntu and are used the most. An estimated 95% of all Ubuntu installations are LTS releases.

Every six months between LTS versions, Canonical publishes an interim release of Ubuntu, with 21.10 being the latest example. These are production-quality releases and are supported for 9 months, with sufficient time provided for users to update, but these releases do not receive the long-term commitment of LTS releases.

Check Ubuntu version with cat /etc/os-release

The best way to check Ubuntu version is using cat /etc/os-release command. Open the terminal and type cat /etc/os-release. This command will list Linux distribution name and release version information. It works on almost all Linux system.

This command still works if we are running a very old Ubuntu system.

Use the following command to know the OS version on our old system:
$ cat /etc/os-release
NAME=”Ubuntu”
VERSION=”20.04.2 LTS (Focal Fossa)”
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME=”Ubuntu 20.04.2 LTS”
VERSION_ID=”20.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=focal
UBUNTU_CODENAME=focal

cat /etc/*release

  • ———- On Red Hat Linux ———-
    $ cat /etc/redhat-release
  • ———- On CentOS Linux ———-
    $ cat /etc/centos-release
  • ———- On Fedora Linux ———-
    $ cat /etc/fedora-release
  • ———- On Debian Linux ———-
    $ cat /etc/debian_version
  • ———- On Ubuntu and Linux Mint ———-
    $ cat /etc/lsb-release
  • ———- On Gentoo Linux ———-
    $ cat /etc/gentoo-release
  • ———- On SuSE Linux ———-
    $ cat /etc/SuSE-release

Check Ubuntu version with uname command

We will use uname command to get the Ubuntu version. This command is used to print our Linux system information such as kernel version and release name, network hostname, machine hardware name, processor architecture, hardware platform and the operating system.

The command uname -a shows the version of the Linux kernel we are using, as well as additional details.

uname -a
Linux ip-10-0-0-224 5.4.0-1045-aws #47-Ubuntu SMP Tue Apr 13 07:02:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

check Ubuntu version with cat /proc/version

The /proc/version file specifies the version of the Linux kernel, the version of gcc used to compile the kernel, and the time of kernel compilation. It also contains the kernel compiler’s user name.

$ cat /proc/version
Linux version 5.4.0-1045-aws (buildd@lcy01-amd64-026) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #47-Ubuntu SMP Tue Apr 13 07:02:25 UTC 2021

 

Check Ubuntu version with lsb_release command

The lsb_release command is a helpful utility to find out information about our Linux installation. It displays LSB (Linux Standard Base) information about the Linux distribution.

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

If you meet any issues with Linux, record them with Loom and send the link to us here. We will reply ASAP.

Load WordPress Sites in as fast as 37ms!