我的处理器是64位还是32位?

我在Ubuntu上,我做了这个命令:

$ uname -a Linux slabrams-desktop 2.6.32-29-generic #58-Ubuntu SMP Fri Feb 11 19:00:09 UTC 2011 i686 GNU/Linux 

这是否意味着我使用32位或64位处理器?

我试图解决这个问题的原因是我得到的错误看起来像这样:

 cannot execute binary file 

从谷歌搜索,我认为这是一个处理器问题。 有任何想法吗?

这意味着您运行的是32位内核,这意味着您只能在不使用模拟器或虚拟化的情况下运行32位应用程序。

如果要查看处理器是否为64位,请在/proc/cpuinfo列出的标志中查找lm

你可以使用lscpu

 someuser@somelaptop:~$ lscpu Architecture: i686 # <-- your kernel is 32 bit CPU op-mode(s): 32-bit, 64-bit # <-- your cpu can handle 32 or 64 bit instructions CPU(s): 4 Thread(s) per core: 2 Core(s) per socket: 2 CPU socket(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 37 Stepping: 5 CPU MHz: 1199.000 Virtualisation: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 3072K 

建筑领域的进一步说明:

 X86, i686, or i386 means you are running a 32 bit kernel. X86_64 , amd64 , or X64 means you are running a 64 bit kernel. 

您还可以使用file: file filetocheck检查您尝试运行的二进制file filetocheck 。 它将提到32位或64位。

基本理念:

x86_64是64位能力的CPU,而i386是32位。

用lscpu

答案lscpu长: lscpu

 Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 2 On-line CPU(s) list: 0,1 Thread(s) per core: 1 Core(s) per socket: 2 Socket(s): 1 NUMA node(s): 1 Vendor ID: AuthenticAMD CPU family: 17 Model: 3 Stepping: 1 CPU MHz: 550.000 BogoMIPS: 4397.92 Virtualization: AMD-V L1d cache: 64K L1i cache: 64K L2 cache: 512K NUMA node0 CPU(s): 0,1 

简短回答lscpu | awk '/CPU op-mode/ {print} lscpu | awk '/CPU op-mode/ {print}

输出: CPU op-mode(s): 32-bit, 64-bit

随着lshw

答案很长:运行sudo lshw

稍微简短的回答: sudo lshw -c cpu

输出:

  *-cpu description: CPU product: AMD Turion(tm) X2 Dual-Core Mobile RM-75 vendor: Advanced Micro Devices [AMD] physical id: 4 bus info: cpu@0 version: Turion X2 Mobile RM-75 slot: Socket M2/S1G1 size: 550MHz capacity: 4GHz width: 64 bits clock: 200MHz capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp x86-64 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch osvw skinit hw_pstate lbrv svm_lock nrip_save vmmcall cpufr 

更短的答案: sudo lshw -c cpu | grep width sudo lshw -c cpu | grep width

输出: width: 64 bits

uname -p给出了处理器的架构。 如果它给出x86_64 ,则表示cpu为64位。