众所周知,Linux大部分操作是通过命令实现的,并不像windows那么直观。linux查看硬件信息也是需要通过linux查看硬件信息命令查询的,下面小编来分享一下linux查看硬件信息的方法和命令写法。
linux查看硬件信息
一、查看cpu
lscpu命令,查看的是cpu的统计信息.
blue@blue-pc:~$ lscpu
Architecture: i686 #cpu架构
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian #小尾序
CPU(s): 4 #总共有4核
On-line CPU(s) list: 0-3
Thread(s) per core: 1 #每个cpu核,只能支持一个线程,即不支持超线程
Core(s) per socket: 4 #每个cpu,有4个核
Socket(s): 1 #总共有1一个cpu
Vendor ID: GenuineIntel #cpu产商 intel
CPU family: 6
Model: 42
Stepping: 7
CPU MHz: 1600.000
BogoMIPS: 5986.12
Virtualization: VT-x #支持cpu虚拟化技术
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 6144K
查看/proc/cpuinfo,可以知道每个cpu信息,如每个CPU的型号,主频等。
#cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2320 CPU @ 3.00GHz
.....
上面输出的是个cpu部分信息,还有3个cpu信息省略了。
二、查看内存情况
free%20-m
total%20used%20free%20shared%20buffers%20cached
Mem:%203926%203651%20274%200%2012%20404
-/+%20buffers/cache:%203235%20691
Swap:%209536%2031%209505
这里的单位是MBlinux命令大全,总共的内存是3926MB。
查看内存详细使用
#%20cat%20/proc/meminfo
MemTotal:%204020868%20kB
MemFree:%20230884%20kB
Buffers:%207600%20kB
Cached:%20454772%20kB
SwapCached:%20836%20kB
.....
三、查看内存硬件信息
dmidecode%20-t%20memory
#%20dmidecode%202.11
SMBIOS%202.7%20present.
Handle%200x0008,%20DMI%20type%2016,%2023%20bytes
Physical%20Memory%20Array
Location:%20System%20Board%20Or%20Motherboard
....
Maximum%20Capacity:%2032%20GB
....
Handle%200x000A,%20DMI%20type%2017,%2034%20bytes
....
Memory%20Device
Array%20Handle:%200x0008
Error%20Information%20Handle:%20Not%20Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
.....
我的主板有4个槽位,只用了一个槽位,上面插了一条4096MB的内存。