- 查看系统内核
long@pc1:/proc$ uname -a
Linux XPS-15-9560 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
- 查看CPU
long@pc1:/proc$ cat /proc/cpuinfo | grep model\ name
model name : Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
model name : Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
model name : Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
model name : Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
model name : Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
model name : Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
model name : Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
model name : Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
- 查看内存
long@pc1:/proc$ cat /proc/meminfo | grep MemTotal
MemTotal: 7807956 kB
- 查看显卡
long@pc1:/proc$ lspci | grep 'VGA'
00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
- 查看声卡
long@pc1:/proc$ lspci | grep -i 'Audio'
00:1f.3 Audio device: Intel Corporation Device a171 (rev 31)
- 查看网卡
long@pc1:/proc$ lspci | grep -i 'Network'
02:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)
- 查看硬盘
long@pc1:/proc$ df -lh
Filesystem Size Used Avail Use% Mounted on
udev 3.7G 0 3.7G 0% /dev
tmpfs 763M 79M 684M 11% /run
/dev/nvme0n1p6 92G 75G 13G 86% /
tmpfs 3.8G 58M 3.7G 2% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
/dev/loop3 143M 143M 0 100% /snap/inkscape/2527
/dev/loop4 84M 84M 0 100% /snap/core/3017
/dev/loop1 146M 146M 0 100% /snap/inkscape/3080
/dev/loop0 84M 84M 0 100% /snap/core/3247
/dev/loop2 84M 84M 0 100% /snap/core/3440
tmpfs 763M 192K 763M 1% /run/user/1000
另外一个命令
其实就一个命令就搞定了:dmidecode
这个可以看具体的硬件信息,这个命令需要使用sudo
最常用的选项就是用 -t
或者 --type
来限定关键字:
bios, system, baseboard, chassis, processor, memory, cache, connector, slot
这里只介绍memory的检测。
直接上我自己Ubuntu测试的结果:
#sudo dmidecode -t memory
[sudo] password for superuser:
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 3.0 present.
Handle 0x0045, DMI type 16, 23 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 32 GB
Error Information Handle: Not Provided
Number Of Devices: 2
Handle 0x0046, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x0045
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: SODIMM
Set: None
Locator: DIMM A
Bank Locator: BANK 0
Type: DDR4
Type Detail: Synchronous Unbuffered (Unregistered)
Speed: 2400 MHz
Manufacturer: SK Hynix
Serial Number: 28326493
Asset Tag: 01164700
Part Number: HMA851S6AFR6N-UH
Rank: 1
Configured Clock Speed: 2400 MHz
Minimum Voltage: 1.2 V
Maximum Voltage: 1.2 V
Configured Voltage: 1.2 V
Handle 0x0047, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x0045
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: SODIMM
Set: None
Locator: DIMM B
Bank Locator: BANK 2
Type: DDR4
Type Detail: Synchronous Unbuffered (Unregistered)
Speed: 2400 MHz
Manufacturer: SK Hynix
Serial Number: 283264D1
Asset Tag: 01164700
Part Number: HMA851S6AFR6N-UH
Rank: 1
Configured Clock Speed: 2400 MHz
Minimum Voltage: 1.2 V
Maximum Voltage: 1.2 V
Configured Voltage: 1.2 V