I am trying to figure out the list of possible ways to find out if a Linux machine is 32 bit or 64 bit.
Method 1:
The command uname -m will specify if my machine is 32 bit or 64 bit.
Method 2:
I can run the command getconf LONG_BIT to find if it is 32 bit or 64 bit.
Method 3:
I can check for the lm bit in the /proc/cpuinfo file. If that bit is not set, then I can say my machine is a 32 bit machine.
Which of the above methods is the more accurate way of telling if my machine is a 32 bit machine or 64 bit machine? Or is there any other efficient way/command to find out the same?
/proc/cpuinfo
and simply parsing it. – slm Oct 29 '13 at 21:44