眾所周知,Linux大部分操作是通過(guò)命令實(shí)現(xiàn)的,并不像windows那么直觀。linux查看硬件信息也是需要通過(guò)linux查看硬件信息命令查詢的,下面小編來(lái)分享一下linux查看硬件信息的方法和命令寫法。
linux查看硬件信息
一、查看cpu
lscpu命令,查看的是cpu的統(tǒng)計(jì)信息.
blue@blue-pc:~$ lscpu
Architecture: i686 #cpu架構(gòu)
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 #每個(gè)cpu核,只能支持一個(gè)線程,即不支持超線程
Core(s) per socket: 4 #每個(gè)cpu,有4個(gè)核
Socket(s): 1 #總共有1一個(gè)cpu
Vendor ID: GenuineIntel #cpu產(chǎn)商 intel
CPU family: 6
Model: 42
Stepping: 7
CPU MHz: 1600.000
BogoMIPS: 5986.12
Virtualization: VT-x #支持cpu虛擬化技術(shù)
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 6144K
查看/proc/cpuinfo,可以知道每個(gè)cpu信息,如每個(gè)CPU的型號(hào),主頻等。
#cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2320 CPU @ 3.00GHz
.....
上面輸出的是個(gè)cpu部分信息,還有3個(gè)cpu信息省略了。
二、查看內(nèi)存情況
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命令大全,總共的內(nèi)存是3926MB。
查看內(nèi)存詳細(xì)使用
#%20cat%20/proc/meminfo
MemTotal:%204020868%20kB
MemFree:%20230884%20kB
Buffers:%207600%20kB
Cached:%20454772%20kB
SwapCached:%20836%20kB
.....
三、查看內(nèi)存硬件信息
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個(gè)槽位,只用了一個(gè)槽位,上面插了一條4096MB的內(nèi)存。