How to find out your Ubuntu's release codename or version

So you want to know if you are on natty, precise, quantal, or something else? Check /etc/lsb-release.

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS"

Or, use the lsb_release command:

$ lsb_release -cd
Description:	Ubuntu 14.04.1 LTS
Codename:	trusty
Arne Hartherz