Shihui Guo

Running on a 32/64bit linux ? Or Processor?

To tell if you are running a 32/64bit linux kernel, do:

$uname -m

If it returns i686, you got a 32bit linux; if it is x86_64, you got a 64bit one. Or in rare cases, you got i386, then 99 out of 100 you are running a 32bit.

To tell if you got a processor capable of supporting 32/64bit, do:

$grep flags /proc/cpuinfo

It will return something like:

flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm

Look out for "lm", which means "long mode", or capable of 64bit. If you can't find it, you got CPUs that is only able to deal with 32bit.

Also a small hint, here it returns two rows of flags information, which means you got 2 cores (this is not surprising, right...).

点击查看评论