Introduction
When you are using any operating system, the minimum is to know the version of the operating system you are using.
This is also necessary to see if the program you want to install matches that version? It also helps with troubleshooting quickly.
Below is the guide on how to check the Ubuntu version by the terminal.
How to check the Ubuntu Version by the terminal
1. Check the Ubuntu version by using the lsb_release -a command
$ lsb_release -a
Output:
I’m using Ubuntu 20.04.2 LTS.
2. Check the Ubuntu version by using the /etc/issue file
The /etc/issue file contains the system identifier text. Using cat command to read it:
$ cat /etc/issue
Output:
3. Check the Ubuntu version by using the /etc/os-release file
The /etc/os-release file contains data that identifies the operating system. This option only works at Ubuntu 16.04 or newer. Using cat command to read it:
$ cat /etc/os-release
Output:
4. Check the Ubuntu version by using the hostnamectl command
This option only works at Ubuntu 16.04 or newer:
$ hostnamectl
Output:
Conclusion
You’ve already gone through the details of how to check the Ubuntu Version by the terminal.
Thanks for reading.