Update

Thanks to Jayen, there is a better way:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 9.10
Release:	9.10
Codename:	karmic
$ cat /etc/issue
Debian GNU/Linux squeeze/sid n l

Or

$ cat /proc/version
Linux version 2.6.32-trunk-686 (Debian 2.6.32-5) (ben@decadent.org.uk) (gcc version 4.3.4 (Debian 4.3.4-6) ) #1 SMP Sun Jan 10 06:32:16 UTC 2010

Source: Which Linux Distro are you using??