Determine if CPU is 32-bit or 64-bit

I was pretty certain the CPU on my file server was 64-bit but it has been a while since I cared. Running uname -a showed me this:

$ uname -a
Linux Chef 2.6.13-15-smp #1 SMP Tue Sep 13 14:56:15 UTC 2005 i686 i686 i386 GNU/Linux

Well, i686 i686 i386 GNU/Linux tells me I’m running a 32-bit OS. With a 64-bit OS I would have seen something like x86_64 GNU/Linux. Still, I’m pretty sure I have a 64-bit processor and for whatever reason I installed 32-bit Suse Linux.

To find out if your CPU is 32-bit or 64-bit, on Linux you can check /proc/cpuinfo

$ grep flags /proc/cpuinfo
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm pni monitor ds_cpl cid cx16 xtpr lahf_lm
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm pni monitor ds_cpl cid cx16 xtpr lahf_lm

If the flag “lm” is present (which is the case here) then the processor is indeed 64-bit.

Tags: , ,

Sunday, February 26th, 2012 Tips and Tricks

Leave a Reply

 

Comments are moderated due to spammers. Your comments will not appear until I review and approve them. If you left a question I will answer as best I can so be sure to check back.