32 bits or 64 bits?
xxxxxxxxxx
getconf LONG_BIT
Easy and direct way to find this out.
xxxxxxxxxx
grep flags /proc/cpuinfo
Explanation(only in linux):
Look for "lm" in the command output. If lm is found in the output, then the CPU is 64-bit. If you don't see lm or see i386, i486, i586, or i686 in the output, then the CPU is 32-bit. Below is an example output of the above line with lm in the information.