What Operating System(OS) am i using ?

Very trivial question and very short answer

Most of the time this works:

Method 1:

lsb_release -a

Sample Output

1) CentOS

[root@localhost poorak]# lsb_release -a
LSB Version:	:core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch
Distributor ID:	CentOS
Description:	CentOS release 6.2 (Final)
Release:	6.2
Codename:	Final

2) Ubuntu

poorak@ubuntu-pkashyap:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 11.10
Release:	11.10
Codename:	oneiric

Method 2:

 cat /proc/version

Sample Output
1) CentOS

[root@localhost poorak]# cat /proc/version
Linux version 2.6.32-220.4.2.el6.i686 (mockbuild@c6b18n3.bsys.dev.centos.org) (gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) ) #1 SMP Tue Feb 14 00:24:28 GMT 2012

2) Ubuntu

poorak@ubuntu-pkashyap:~$ cat /proc/version
Linux version 3.0.0-13-generic (buildd@crested) (gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) ) #22-Ubuntu SMP Wed Nov 2 13:27:26 UTC 2011

Please feel free to add other methods.