In Linux, how does one determine whether the CPU and system are 32-bit or 64-bit?

Source: Internet
Author: User

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
?
  1. Grep flags/proc/cpuinfo

Grep flags/proc/cpuinfo

Output

View plain
Copy to clipboard
Print
?
  1. 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
?
  1. Uname-

Uname-

Output 1

View plain
Copy to clipboard
Print
?
  1. 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
?
  1. 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.