having to manage a few server and install services,i need to know what distribution of linux for each box i handle. So, to check linux  distro version  of my box i would run this in my shell :

cat /proc/version

as for example, the result is like this for ubuntu :

Linux version 2.6.27-14-generic (buildd@palmer) (gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu12) ) #1 SMP Wed Apr 15 18:59:16 UTC 2009

as for centos would like this :

Linux version 2.6.18-53.1.14.el5 (mockbuild@builder6.centos.org) (gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)) #1 SMP Wed Mar 5 11:36:49 EST 2008

easy right ? :)