How to get the Ubuntu version from the commandline
lsb_release -a
Look for the line that starts with Release:
. The following number is your version number. As of this writing, mine says Release: 12.04
, which means I am running Ubuntu version 12.04
.