HOWTO: Check if Your System Will Support a 64-bit OS (x86_64 Linux)

| No TrackBacks
So you've got a really sweet system, but you want to know if it will run a 64-bit OS.  Like 64-bit Linux, of course.  Easiest way I've found to tell if your system supports a 64-bit OS is to check the output of /proc/cpuinfo.  Specifically, check "flags" for "lm" (Long Mode):

(mark@skull)~> cat /proc/cpuinfo | grep -i -e processor -e flags
processor       : 0
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 syscall nx lm pni monitor ds_cpl cid cx16 xtpr
processor       : 1
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 syscall nx lm pni monitor ds_cpl cid cx16 xtpr


Notice the "lm" in the flags on each of the CPU's.  If you see "lm" in the flags then your system will support an x86_64 kernel.  If you don't see "lm", then you're obviously stuck in 32-bit land.  In the kernel, this is defined in include/asm-x86_64/cpufeature.h ...

(mark@skull)~> cat linux-2.6.22/include/asm-x86_64/cpufeature.h | grep "Long Mode"
#define X86_FEATURE_LM          (1*32+29) /* Long Mode (x86-64) */

Did You Find this Helpful?

Did you find this post helpful, or at least, interesting?

  

Send Mark a Direct Message

If you'd like to send me a direct message, please do so below. However, I do not publicly post comments or messages submitted directly to me. So, if you're going to try to SPAM me, or my blog, you're pretty much wasting your time.

400 characters remaining

Error

About Mark

A Silicon Valley native, Mark Kolich is a full-time Software Engineer, a casual entrepreneur, and a consultant for hire. A web technologies expert, his current focus is on building powerful and robust cloud-driven web-applications using Java, PHP, Perl, AJAX, DHTML, CSS, and JavaScript. His favorite programming languages are PHP, Java and JavaScript. He uses Linux, enjoys biking to work, loves building great software, and always writes elegant, readable, and maintainable code.

No TrackBacks

No trackbacks attached to this entry.

Twitter (@markkolich)

Translate

About this Entry

This page contains a single entry by Mark Kolich published on November 17, 2008 5:12 PM.

HOWTO: Setup and Configure Linux Software RAID (CentOS/Fedora/RedHat) was the previous entry in this blog.

Employees Sue to be Paid for Time Spent Booting Up is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.