Thursday, September 11, 2014

how to 32 bit vs 64 bit

  •  how to 32 bit vs 64 bit



x86_64 ==> 64-bit kernel
i686   ==> 32-bit kernel

on linux commands to find

cat /proc/cpuinfo

grep flags /proc/cpuinfo

tm(transparent mode) or rm(real mode) or lm(long mode)

rm ==> 16-bit processor
tm ==> 32-bit processor
lm ==> 64-bit processor

you can have a 64-bit CPU with a 32-bit kernel installed


getconf LONG_BIT
    32, if OS is 32 bit
    64, if OS is 64 bit

 grep "CONFIG_64" /lib/modules/*/build/.config




#include <stdio.h>

int main(void)
{
    printf("%d\n", __WORDSIZE);
    return 0;
}



$ ls -l /lib*/ld-linux*.so.2
/lib/ld-linux.so.2
/lib64/ld-linux-x86-64.so.2


lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit

http://stackoverflow.com/questions/246007/how-to-determine-whether-a-given-linux-is-32-bit-or-64-bit  

No comments:

Post a Comment