If available use
or lsb_release -a for full output, as previously mentioned by repo above. Otherwise check under the /etc directory: each distribution has a file with "release" in its name. For example on my OpenSuSE box I have /etc/SuSE-release whose content is
$ cat /etc/SuSE-release
openSUSE 11.1 (i586)
VERSION = 11.1
On machines running Unix, check for files containing "version" in their name.