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
 

No comments:

Post a Comment