Photo by Gabriel Heinzer on Unsplash
There are several commands that you can use to find out what version of Ubuntu you are running. The lsb_release utility displays LSB (Linux Standard Base) information about the Linux distribution.
Use the lsb_release -a command to display the Ubuntu version.
$ lsb_release -a
Then the following output will display and its showing Ubuntu version as 18.04
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
Instead of printing all of the above information, you can display the description line, which shows your Ubuntu version passing the -d switch.
$ lsb_release -d
Then you will see the output as below only displaying description.
Description: Ubuntu 18.04.5 LTS