Hi Dude. This article will show Ubuntu version using the command line. Why we need to know ubuntu version. One of the question is to know limit update of the software or package.
For example, we want to install zimbra mail server. Zimbra need requirement minimum operating system version to install running well. If we dont meet minimum requirement, impossible to continue install.
Here is some method to check ubuntu version.
lsb_release
This is popular command to find out what version of Ubuntu you are running. The lsb_release
utility displays LSB (Linux Standard Base) information about the Linux distribution. Which displays LSB (Linux Standard Base) information about the Linux distribution.
Lets check it on terminal to run command line.
:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
In description above, we can show all detail information about our running ubuntu version.
Using the /etc/issue
file
Number two, we can determine version ubuntu with open or view file name /etc/issue.
~$ cat /etc/issue
Ubuntu 20.04.3 LTS \n \l
Using the /etc/os-release
file
Ok, Number three use /etc/os-release. This method will work only if you have Ubuntu 16.04 or newer.
~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 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
Using the hostnamectl
command
The last, is using command hostnamectl
. This is a command that allows you to set the system hostname, but you can also use it to check your Ubuntu version.
:~$ hostnamectl
Static hostname: mta.habibza.in
Icon name: computer-vm
Chassis: vm
Machine ID: 79c17bb5b1ab48a38b11407d156db139
Boot ID: e9e4e5fea1b0472bae56332c5908e230
Virtualization: vmware
Operating System: Ubuntu 20.04.3 LTS
Kernel: Linux 5.4.0-89-generic
Architecture: x86-64
That is some of method to check ubuntu version. Hope it’s helpful, Feel free to leave a comment if you have any questions and I’ll appreciate it.