Wednesday, November 14, 2012

How to determine whether a given Linux is 32 bit or 64 bit?

 

86 down vote accepted
Try uname -m. It seems like the uname -m actually gives
x86_64 ==> 64-bit kernel
i686   ==> 32-bit kernel

Otherwise, not for the Linux kernel, but for the CPU, you type:
cat /proc/cpuinfo
or:
grep flags /proc/cpuinfo
Under "flags" parameter, you will see various values. Among them, one is named "tm(transparent mode)" or "rm(real mode)" or "lm(long mode)"
rm ==> 16-bit processor
tm ==> 32-bit processor
lm ==> 64-bit processor
Note: you can have a 64-bit CPU with a 32-bit kernel installed"

If you were running a 64 bit platform you would see x86_64 or something very similar in the output from uname -a
To get your specific machine hardware name run
uname -m
You can also call
getconf LONG_BIT
which returns either 32 or 64
lscpu will list out these among other information regarding your CPU:
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
...
courtesty from link: http://stackoverflow.com/questions/246007/how-to-determine-whether-a-given-linux-is-32-bit-or-64-bit
 

How Do I Know if I’m Running 32-bit or 64-bit Linux? [Answers]

If you’ve bought a new computer recently, you probably have a 64-bit processor and installed the 64-bit version of your Linux distribution. What if your computer is a bit older and you don’t remember?
There is a nice and simple command line program called uname that will tell us exactly that.
Open a terminal window (Applications > Accessories > Terminal).
sshot-2
In the terminal window, type in
uname –m
and hit enter.
  • If the response is i686, you have a 32-bit version of Linux.
  • If the response is x86_64, you have a 64-bit version of Linux.

Note: if you get some other value like i386, you almost certainly have a 32-bit version of Linux.
You can find out more detail about your particular installation of Linux, like your kernel version, by entering
uname –a

Thanks to niteshifter and overdrank from this Ubuntu forums thread for this information.
If you’re using Windows, check out our Answers article on how to know if you’re running the 32 or 64-bit version.

Link: http://www.howtogeek.com/howto/24842/how-do-i-know-if-im-running-32-bit-or-64-bit-linux-answers/