使用 lshw 工具
安裝
檢測
CPU
❯ sudo lshw -short -class bus -class cpu
H/W path Device Class Description
=========================================================
/0 bus 01M3M4
/0/400 processor 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz
/0/100/d bus Tiger Lake-LP Thunderbolt 4 USB Controller
/0/100/d/0 usb1 bus xHCI Host Controller
/0/100/d/1 usb2 bus xHCI Host Controller
/0/100/d.2 bus Tiger Lake-LP Thunderbolt 4 NHI #0
/0/100/14 bus Tiger Lake-LP USB 3.2 Gen 2x1 xHCI Host Controller
/0/100/14/0 usb3 bus xHCI Host Controller
/0/100/14/1 usb4 bus xHCI Host Controller
/0/100/15 bus Tiger Lake-LP Serial IO I2C Controller #0
/0/100/15.1 bus Tiger Lake-LP Serial IO I2C Controller #1
/0/100/1c/0 mmc0 bus RTS525A PCI Express Card Reader
/0/100/1f.4 bus Tiger Lake-LP SMBus Controller
/0/100/1f.5 bus Tiger Lake-LP SPI Controller
RAM
❯ sudo lshw -short -C memory
H/W path Device Class Description
=========================================================
/0/1 memory 1MiB BIOS
/0/400/701 memory 128KiB L1 cache
/0/400/702 memory 5MiB L2 cache
/0/400/703 memory 8MiB L3 cache
/0/700 memory 192KiB L1 cache
/0/1000 memory 64GiB System Memory
/0/1000/0 memory 32GiB SODIMM DDR4 Synchronous 3200 MHz (0.3 ns)
/0/1000/1 memory 32GiB SODIMM DDR4 Synchronous 3200 MHz (0.3 ns)
/0/100/14.2 memory RAM memory
硬碟
❯ sudo lshw -class disk -class storage -short
H/W path Device Class Description
=========================================================
/0/100/e storage Volume Management Device NVMe RAID Controller
/0/1d/0 storage P2 NVMe PCIe SSD
/3 /dev/nvme0 storage CT2000P3PSSD8
/3/0 hwmon1 disk NVMe disk
/3/2 /dev/ng0n1 disk NVMe disk
/3/1 /dev/nvme0n1 disk 2TB NVMe disk
網路介面
❯ sudo lshw -class network
*-network:0
description: Wireless interface
product: Wi-Fi 6 AX201
vendor: Intel Corporation
physical id: 14.3
bus info: pci@0000:00:14.3
logical name: wlp0s20f3
version: 20
serial: 7c:21:4a:8a:1b:be
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=iwlwifi driverversion=6.1.0-21-amd64 firmware=72.daa05125.0 QuZ-a0-hr-b0-72.u ip=192.168.0.4 latency=0 link=yes multicast=yes wireless=IEEE 802.11
resources: iomemory:600-5ff irq:16 memory:6055294000-6055297fff
*-network:1
description: Ethernet interface
product: Ethernet Connection (13) I219-LM
vendor: Intel Corporation
physical id: 1f.6
bus info: pci@0000:00:1f.6
logical name: enp0s31f6
version: 20
serial: a0:29:19:7d:1d:48
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=6.1.0-21-amd64 firmware=0.8-4 latency=0 link=no multicast=yes port=twisted pair
resources: irq:163 memory:a6100000-a611ffff
參考資料