How can I tell what version of Linux I'm using?

If I need to know what it is say Linux/Unix , 32/64 bit

uname -a 

This would give me almost all information that I need,

If I further need to know what release it is say (Centos 5.4, or 5.5 or 5.6) on a Linux box I would further check the file /etc/issue to see its release info ( or for Debian / Ubuntu /etc/lsb-release )

Alternative way is to use the lsb_release utility:

lsb_release -a

Or do a rpm -qa | grep centos-release or redhat-release for RHEL derived systems


Use the following commands to get more details:

  1. cat /etc/*release*
  2. uname -a

You should look into the uname command.

I have to deal with a large parc of heterogenous machines. uname -a is usually my first reflex when I log in.