To find version of Ubuntu/Debian, you can run
cat /etc/*release
Example
root@Debian-Server:~# cat /etc/*release PRETTY_NAME="Debian GNU/Linux 8 (jessie)" NAME="Debian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" ID=debian HOME_URL="http://www.debian.org/" SUPPORT_URL="http://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" root@Debian-Server:~#
This way show exact point release, for example this is Debian 8.8. You can use lsb_release command to find more details, lets first install lsb_release if not already installed.
apt install lsb-release
Now run
lsb_release -a
Example
root@Debian-Server:~# lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 8.8 (jessie) Release: 8.8 Codename: jessie root@Debian-Server:~#
On Ubuntu 16.04
boby@hon-pc-01:~ $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial boby@hon-pc-01:~ $
lsb_release -cs
root@debian:~# lsb_release -cs stretch root@debian:~#