1. in Linux, how does one determine whether your CPU is 32-bit or 64-bit?
Run the following command:
View plain
Copy to clipboard
Print
?
- Grep flags/proc/cpuinfo
Grep flags/proc/cpuinfo
Output
View plain
Copy to clipboard
Print
?
- Flags: fpu vme de pse tsc msr pae mce cx8 APIC Sep mtrr pge mca cmov Pat limit 36 clflush dts acpi mmx fxsr SSE sse2 SS HT TM NX LM
Flags <br/>: fpu vme de pse tsc msr pae mce cx8 APIC Sep mtrr pge mca <br/> cmov Pat limit 36 clflush dts acpi mmx fxsr SSE sse2 ss ht tm nx lm <br/>
If lm is found, it indicates that your CPU is 64-bit. lm indicates long mode.
- Long Mode-64-bit CPU
- Real mode-16-bit CPU
- Protected Mode-32-bit CPU
2. in Linux, determine whether you are a 32-bit or 64-bit system.
Run the following command:
View plain
Copy to clipboard
Print
?
- Uname-
Uname-
Output 1
View plain
Copy to clipboard
Print
?
- Linux test-
1
2.6
.
18
-
92. EL5
#1 SMP Tue APR 29 13:16:12 EDT 2008 i686
Linux test-1 2.6.18-92. EL5 #1 SMP Tue APR 29 13:16:12 EDT 2008 i686
I386 and i686 indicate that you are a 32-bit kernel and run a 32-bit system.
Output 2
View plain
Copy to clipboard
Print
?
- Linux test-
2
2.6
.
18
-
92. EL5
#1 SMP Tue APR 29 13:16:15 EDT 2008 x86_64
Linux test-2 2.6.18-92. EL5 #1 SMP Tue APR 29 13:16:15 EDT 2008 x86_64 <br/>
X86_64 indicates that you are a 64-bit kernel and run a 64-bit system.
If the output of cpuinfo has the LM flag, and the output of the uname-a command is i386 or i686, it indicates that you are a 32-bit system running by a 64-bit CPU.