我想知道如何从 Linux 的命令行获取有关以下内容的信息:
小智 23
getconf WORD_BIT
getconf LONG_BIT
(长整数的大小)arch
例如,在 Fedora 14 x64 系统上:
% uname -a
Linux grinchy 2.6.35.14-106.fc14.x86_64 #1 SMP Wed Nov 23 13:07:52 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
% getconf WORD_BIT
32
% getconf LONG_BIT
64
% arch
x86_64
Run Code Online (Sandbox Code Playgroud)
syb*_*eon 11
做一个cat /proc/cpuinfo
看看结果:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Genuine Intel(R) CPU U4100 @ 1.30GHz
stepping : 10
cpu MHz : 1200.000
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm xsave lahf_lm
bogomips : 2593.48
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
Run Code Online (Sandbox Code Playgroud)
从中可以推断出您正在寻找的许多信息。