Ubuntu查看硬件配置

  1. 查看系统内核
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

  1. 查看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

  1. 查看内存
long@pc1:/proc$ cat /proc/meminfo | grep MemTotal MemTotal:7807956 kB

  1. 查看显卡
long@pc1:/proc$ lspci | grep 'VGA' 00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)

  1. 查看声卡
long@pc1:/proc$ lspci | grep -i 'Audio' 00:1f.3 Audio device: Intel Corporation Device a171 (rev 31)

  1. 查看网卡
long@pc1:/proc$ lspci | grep -i 'Network' 02:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)

  1. 查看硬盘
long@pc1:/proc$ df -lh FilesystemSizeUsed Avail Use% Mounted on udev3.7G03.7G0% /dev tmpfs763M79M684M11% /run /dev/nvme0n1p692G75G13G86% / tmpfs3.8G58M3.7G2% /dev/shm tmpfs5.0M4.0K5.0M1% /run/lock tmpfs3.8G03.8G0% /sys/fs/cgroup /dev/loop3143M143M0 100% /snap/inkscape/2527 /dev/loop484M84M0 100% /snap/core/3017 /dev/loop1146M146M0 100% /snap/inkscape/3080 /dev/loop084M84M0 100% /snap/core/3247 /dev/loop284M84M0 100% /snap/core/3440 tmpfs763M192K763M1% /run/user/1000

另外一个命令 【Ubuntu查看硬件配置】其实就一个命令就搞定了: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: 2Handle 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 VHandle 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

    推荐阅读