Recently we got some questions from readers about how to check the Ubuntu version.
- How can I check the version of Ubuntu that I am running?
- What is the command to check the version of Ubuntu?
- How do I find out what version of Ubuntu I have?
- How can I tell which version of Ubuntu I am using?
Ubuntu is an open-source operating system. There are a few ways to check which version of Ubuntu you are running.
In this article, we will mostly focus on the command line methods because in Ubuntu CLI is preferred over GUI as it provides more control.
Table of Contents
4 Commands to Check Ubuntu Version
To check the Ubuntu version, try the following commands.
- use command cat /etc/os-release
- use command uname -a
- use command cat /proc/version
- use command lsb_release -a
The best way to check Ubuntu version is to use the cat /etc/os-release command. This will print out a lot of information about your Ubuntu installation, including the version number.
You can also use the lsb_release -a, uname -a or cat /proc/version commands to check Ubuntu version.
Procedure to check Ubuntu version in Linux
- Open the terminal application (bash shell)
- For remote server login using the ssh: ssh user@server-name
- Type any one of the following commands to check Ubuntu version: cat /etc/os-release, lsb_release -a, hostnamectl
- Type the following command to find Ubuntu Linux kernel version: uname -r
Check Ubuntu version with cat /etc/os-release
The most efficient 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 Ubuntu distribution name and release version information. It works on almost all Ubuntu system.
This command still works if you are running a very old Ubuntu system.
Use the following command to know the OS version on our old system:
$ cat /etc/os-release
VERSION=”20.04.2 LTS (Focal Fossa)”
PRETTY_NAME=”Ubuntu 20.04.2 LTS”
Ubuntu releases have two codenames: the first is the main codename, and the second is the version number.
The “main codename” is the name of the release, and it’s always capitalized. The “version number” is just the number after the dash, and it’s always in lowercase.
For example, Ubuntu 20.04.2 LTS has the main codename “Focal Fossa“, and the version number is “20.04.2“.
The cat command is one of the most frequently used commands in Linux. It allows you to view the contents of a file.
In its simplest form, you can use the cat command like this:
This will print the contents of the file to the terminal window.
so, to view the contents of the /etc/os-release file, you would use the following command:
This will print out a lot of information about your Ubuntu installation, including the version number.
- ———- 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.
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
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.
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
|End of Standard Support
|End of Life
|October 14, 2021
|Ubuntu 20.04.3 LTS
|August 26, 2021
|Ubuntu 20.04.2 LTS
|February 4, 2021
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.