To know which distribution you are using (works for Ubuntu):
lsb_release -rd
or read /etc/lsb-release.