You'll want to use:
$ cat /etc/*-release
You'll get a response similar to this:
$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.10
DISTRIB_CODENAME=oneiric
DISTRIB_DESCRIPTION="Ubuntu 11.10"
Also going to echo another poster's suggestion too (it will pull a bit more detailed information):
$ cat /proc/version
Linux version 3.0.0-14-server (buildd@allspice) (gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) ) #23-Ubuntu SMP Mon Nov 21 20:49:05 UTC 2011