在Linux系统中,有多种方法可以查询CPU型号,以下是一些常用的方法:
cat /proc/cpuinfo
命令cat /proc/cpuinfo
命令会显示关于CPU的详细信息,包括型号、频率、核心数等。在输出中找到 “model name” 字段,后面跟着的就是CPU的型号。
示例输出:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 158
model name : Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
stepping : 10
cpu MHz : 2600.000
cache size : 12288 KB
physical id : 0
siblings : 12
core id : 0
cpu cores : 6
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3 dnowprefetch ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt spec_ctrl intel_stibpbogomips : 4988.44
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management :
lscpu
命令lscpu
命令会提供CPU的完整型号名称,例如:Model name: Intel® Core™ i7-4790 CPU @ 3.60GHz。
示例输出:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 8
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 158
Model name: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Stepping: 10
CPU MHz: 2600.000
BogoMIPS: 4988.44
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 12288K
L3 cache: 12288K
dmidecode
命令dmidecode
命令能显示系统硬件信息,包括CPU。需要管理员权限(sudo)来运行:
sudo dmidecode -t processor
该命令会显示更详细的CPU信息,包括型号、制造商等。
inxi
命令inxi
命令需要安装,某些发行版中可能需要手动安装。它会显示CPU的简要信息,包括型号:
sudo inxi -C
示例输出:
CPU: Intel Core i7-9750H (16 cores, 12 threads) clocked at 2.60GHz
通过上述方法,你可以轻松地查看Linux系统中的CPU型号,并根据这些信息进行后续的硬件评估和系统优化。