hwinfo(硬件信息)-在Linux上查找系统硬件信息的漂亮工具

hwinfo (Hardware Information) - A Nifty Tool for Finding System Hardware Information on Linux

hwinfo是一种硬件信息工具,可用于分析计算机上的硬件并以人类可读的格式显示有关各种硬件组件的详细信息。

它报告有关CPU,RAM,键盘,鼠标,图形卡,声音,存储,网络接口,磁盘,分区,BIOS和网桥等的信息。

该工具可以显示详细信息,例如lshw,dmidecode,inxi和其他工具。

hwinfo libhd库使用libhd.so收集系统上的硬件信息。

该工具是专门为openSUSE系统设计的,但是后来其他发行版将该工具添加到其官方存储库中,因为它提供了有关计算机硬件的更好信息。

如果您正在寻找其他替代方法,请同时阅读以下文章。

  • Dmidecode –在Linux上获取系统硬件信息的最佳工具

  • inxi –在Linux上检查硬件信息的绝佳工具

  • LSHW(硬件列表程序)–在Linux上获取硬件信息的漂亮工具

  • hwinfo实用程序显示以下信息。

  • CPU:制造商,型号,频率

  • 主板:制造商,型号,BIOS版本,板载控制器

  • RAM:RAM大小,RAM类型(FP,EDO,SDRAM,DDRAM)

  • 硬盘控制器:SCSI,IDE,板载/卡,型号,BIOS版本,芯片组

  • 硬盘:类型,制造商,型号,大小,总线系统(SCSI,IDE),分区

  • CD-ROM驱动器:类型,制造商,型号,速度,内部/外部,并行端口?

  • 其他媒体:CD刻录机,流媒体(型号,制造商,SCSI / EIDE /软盘流媒体,容量),ZIP驱动器,Jaz驱动器,MO驱动器,软盘

  • 显卡:型号,制造商,芯片组,内存(DRAM,VRAM),内存大小

  • 其他外围设备:打印机,并行端口,串行端口,调制解调器,ISDN卡

  • 1)如何在Linux上安装hwinfo

    hwinfo软件包在大多数Linux发行版存储库中都可用,并且可以在软件包管理器的帮助下轻松安装。

    对于Fedora/RHEL 8/CentOS 8系统,请使用DNF命令安装hwinfo。

    确保在RHEL / CentOS系统上运行DNF命令之前,应启用EPEL存储库,因为hwinfo软件包在发行官方存储库中不可用。

    1
    $ sudo dnf install hwinfo

    对于Debian/Ubuntu系统,请使用APT-GET命令或APT命令安装hwinfo。

    1
    $ sudo apt install hwinfo

    对于基于Arch Linux的系统,请使用Pacman命令安装hwinfo。

    1
    $ sudo pacman -S hwinfo

    对于RHEL/CentOS系统,请使用YUM命令安装hwinfo。

    确保在RHEL / CentOS系统上运行DNF命令之前,应启用EPEL存储库,因为hwinfo软件包在发行官方存储库中不可用。

    1
    $ sudo yum install hwinfo

    对于openSUSE Leap系统,请使用Zypper命令安装hwinfo。

    1
    $ sudo zypper install hwinfo

    hwinfo的常规语法以下是hwinfo的常规语法。

    1
    hwinfo [OPTIONS] [HARDWARE_ITEM]

    hwinfo工具的可用硬件项目列表它提供了许多硬件项目来将输出与系统分开。

    所有,拱门,BIOS,块,蓝牙,盲文,桥,相机,cdrom,芯片卡,CPU,磁盘,dsl,dvb,指纹,软盘,帧缓冲区,gfxcard,集线器,ide,isapnp,isdn,操纵杆,键盘,内存, 调制解调器,显示器,鼠标,网卡,网络,分区,pci,pcmcia,pcmcia-ctrl,pppoe,打印机,redasd,reallall,扫描仪,scsi,smp,声音,storage-ctrl,sys,磁带,电视,uml,usb, usb-ctrl,vbe,wlan,xen,zip

    2)如何使用hwinfo命令在Linux上显示所有硬件信息

    运行不带任何参数的hwinfo命令,该命令显示有关所有硬件单元的详细信息,但是很难理解,因为它显示了有关硬件组件的详细信息。

    另外,您可以给--all选项,并且两者都显示相同的结果。

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    $ sudo hwinfo
    or
    $ sudo hwinfo --all

    ============ start debug info ============                      
    libhd version 21.68 (x86-64) [7688]
    using /var/lib/hardware
    kernel version is 4.19
    ----- /proc/cmdline -----
      BOOT_IMAGE=/boot/vmlinuz-4.19-x86_64 root=UUID=69d9dd18-36be-4631-9ebb-78f05fe3217f rw quiet resume=UUID=a2092b92-af29-4760-8e68-7a201922573b
    ----- /proc/cmdline end -----
    debug = 0xff7ffff7
    probe = 0x15938fcdaa17fcf9fffe (+memory +pci +isapnp +net +floppy +misc +misc.serial +misc.par +misc.floppy +serial +cpu +bios +monitor +mouse +scsi +usb -usb.mods +modem +modem.usb +parallel +parallel.lp +parallel.zip -isa -isa.isdn +isdn +kbd +prom +sbus +int +braille +braille.alva +braille.fhp +braille.ht -ignx11 +sys -bios.vbe -isapnp.old -isapnp.new -isapnp.mod +braille.baum -manual +fb +pppoe -scan +pcmcia +fork -parallel.imm +s390 +cpuemu -sysfs -s390disks +udev +block +block.cdrom +block.part +edd +edd.mod -bios.ddc -bios.fb -bios.mode +input +block.mods +bios.vesa -cpuemu.debug -scsi.noserial +wlan -bios.crc -hal +bios.vram +bios.acpi -bios.ddc.ports=0 +modules.pata -net.eeprom +x86emu=dump -max -lxrc)
    shm: attached segment 2129939 at 0x7ff3608d8000
    >> hal.1: read hal data
    >> floppy.1: get nvram
    >> floppy.2: klog info
    >> bios.1: cmdline
    >> bios.1.1: apm
    >> bios.2: ram
    /dev/mem[0x400, 256]: mmap(, 4096,,,, 0x0) ok
    /dev/mem[0xc0000, 262144]: mmap(, 262144,,,, 0xc0000) ok
      bios: 2 disks
      bios: 634k low mem
    /dev/mem[0x9e800, 1]: mmap(, 4096,,,, 0x9e000) ok
    /dev/mem[0x9e800, 2048]: mmap(, 4096,,,, 0x9e000) ok
      bios: EBDA 0x00800 bytes at 0x9e800
    >> bios.2: rom
    ----- SMBIOS Entry Point (sysfs) 0x00000 - 0x0001e -----
      000  5f 53 4d 5f 59 1f 02 08 1f 01 00 00 00 00 00 00 "_SM_Y..........."
      010  5f 44 4d 49 5f 96 23 0a e0 5f 0e 00 30 00 28 "_DMI_.#.._..0.("
    ----- SMBIOS Entry Point (sysfs) end -----
      Found DMI table at 0x000e5fe0 (0x0a23 bytes)
      Got DMI table from sysfs (0x0a23 bytes)
    ----- SMBIOS Structure Table 0xe5fe0 - 0xe6a02 -----
      e5fe0  00 18 00 00 01 02 00 e0 03 5f 80 98 f9 4b 00 00 "........._...K.."
      e5ff0  1a 00 03 0d 01 23 01 23 4c 45 4e 4f 56 4f 00 43 ".....#.#LENOVO.C"
      e6000  44 43 4e 33 35 57 57 00 30 33 2f 32 39 2f 32 30 "DCN35WW.03/29/20"
    .
    .

    3)如何使用hwinfo命令在Linux上显示系统硬件的摘要信息

    它将打印有关硬件组件的简短说明。

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    $ sudo hwinfo --short

    cpu:                                                            
                           Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 1100 MHz
                           Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 1237 MHz
                           Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 1291 MHz
                           Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 2075 MHz
                           Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 1559 MHz
                           Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 1192 MHz
                           Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 1175 MHz
                           Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 1218 MHz
    keyboard:
      /dev/input/event5    Logitech Unifying Receiver
      /dev/input/event4    AT Translated Set 2 keyboard
    mouse:
      /dev/input/mice      Logitech Unifying Receiver
      /dev/input/mice      SynPS/2 Synaptics TouchPad
    monitor:
                           LQ156D1JX03 LCD Monitor
    graphics card:
                           nVidia GM107M [GeForce GTX 960M]
                           Intel HD Graphics 530
    sound:
                           Intel 100 Series/C230 Series Chipset Family HD Audio Controller
    storage:
                           Intel HM170/QM170 Chipset SATA Controller [AHCI Mode]
                           Samsung Electronics NVMe SSD Controller SM951/PM951
    network:
      enp9s0               Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
      wlp8s0               Intel Dual Band Wireless-AC 8260
    network interface:
      enp9s0               Ethernet network interface
      wlp8s0               Ethernet network interface
      lo                   Loopback network interface
    disk:
      /dev/nvme0n1         Samsung Electronics NVMe SSD Controller SM951/PM951
      /dev/sda             WDC WD10SPCX-24H
    partition:
      /dev/nvme0n1p1       Partition
      /dev/nvme0n1p2       Partition
      /dev/sda1            Partition
      /dev/sda2            Partition
    usb controller:
                           Intel 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller
    bios:
                           BIOS
    bridge:
                           Intel 100 Series/C230 Series Chipset Family PCI Express Root Port #2
                           Intel HM170 Chipset LPC/eSPI Controller
                           Intel Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16)
                           Intel 100 Series/C230 Series Chipset Family PCI Express Root Port #4
                           Intel Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers
                           Intel 100 Series/C230 Series Chipset Family PCI Express Root Port #9
                           Intel 100 Series/C230 Series Chipset Family PCI Express Root Port #3
    hub:
                           Linux Foundation 2.0 root hub
                           Linux Foundation 3.0 root hub
    memory:
                           Main Memory
    bluetooth:
                           Intel Bluetooth Device
    unknown:
                           FPU
                           DMA controller
                           PIC
                           Keyboard controller
                           PS/2 Controller
                           Intel 100 Series/C230 Series Chipset Family Power Management Controller
                           Intel 100 Series/C230 Series Chipset Family MEI Controller #1
                           O2 Micro SD/MMC Card Reader Controller
                           Intel 100 Series/C230 Series Chipset Family SMBus
      /dev/input/event12   Syntek Lenovo EasyCamera

    另外,您可以按以下方式过滤特定的硬件信息摘要。

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    $ sudo hwinfo --block --short

    disk:                                                          
      /dev/nvme0n1         Samsung Electronics NVMe SSD Controller SM951/PM951
      /dev/sda             WDC WD10SPCX-24H
    partition:
      /dev/nvme0n1p1       Partition
      /dev/nvme0n1p2       Partition
      /dev/sda1            Partition
      /dev/sda2            Partition

    4)如何使用hwinfo命令在Linux上显示CPU信息

    要仅显示详细的CPU信息,请在hwinfo命令中使用--cpu选项。 这包括处理器型号,供应商,系统架构,时钟速度和cpu缓存大小。

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    $ sudo hwinfo --cpu

    01: None 00.0: 10103 CPU                                        
      [Created at cpu.462]
      Unique ID: rdCR.j8NaKXDZtZ6
      Hardware Class: cpu
      Arch: X86-64
      Vendor:"GenuineIntel"
      Model: 6.94.3"Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz"
      Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,syscall,nx,pdpe1gb,rdtscp,lm,constant_tsc,art,arch_perfmon,pebs,bts,rep_good,nopl,xtopology,nonstop_tsc,cpuid,aperfmperf,tsc_known_freq,pni,pclmulqdq,dtes64,monitor,ds_cpl,vmx,est,tm2,ssse3,sdbg,fma,cx16,xtpr,pdcm,pcid,sse4_1,sse4_2,x2apic,movbe,popcnt,tsc_deadline_timer,aes,xsave,avx,f16c,rdrand,lahf_lm,abm,3dnowprefetch,cpuid_fault,epb,invpcid_single,pti,ssbd,ibrs,ibpb,stibp,tpr_shadow,vnmi,flexpriority,ept,vpid,ept_ad,fsgsbase,tsc_adjust,bmi1,hle,avx2,smep,bmi2,erms,invpcid,rtm,mpx,rdseed,adx,smap,clflushopt,intel_pt,xsaveopt,xsavec,xgetbv1,xsaves,dtherm,ida,arat,pln,pts,hwp,hwp_notify,hwp_act_window,hwp_epp,md_clear,flush_l1d
      Clock: 2605 MHz
      BogoMips: 5184.00
      Cache: 6144 kb
      Units/Processor: 16
      Config Status: cfg=new, avail=yes, need=no, active=unknown

    02: None 01.0: 10103 CPU
      [Created at cpu.462]
      Unique ID: wkFv.j8NaKXDZtZ6
      Hardware Class: cpu
      Arch: X86-64
      Vendor:"GenuineIntel"
      Model: 6.94.3"Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz"
      Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,syscall,nx,pdpe1gb,rdtscp,lm,constant_tsc,art,arch_perfmon,pebs,bts,rep_good,nopl,xtopology,nonstop_tsc,cpuid,aperfmperf,tsc_known_freq,pni,pclmulqdq,dtes64,monitor,ds_cpl,vmx,est,tm2,ssse3,sdbg,fma,cx16,xtpr,pdcm,pcid,sse4_1,sse4_2,x2apic,movbe,popcnt,tsc_deadline_timer,aes,xsave,avx,f16c,rdrand,lahf_lm,abm,3dnowprefetch,cpuid_fault,epb,invpcid_single,pti,ssbd,ibrs,ibpb,stibp,tpr_shadow,vnmi,flexpriority,ept,vpid,ept_ad,fsgsbase,tsc_adjust,bmi1,hle,avx2,smep,bmi2,erms,invpcid,rtm,mpx,rdseed,adx,smap,clflushopt,intel_pt,xsaveopt,xsavec,xgetbv1,xsaves,dtherm,ida,arat,pln,pts,hwp,hwp_notify,hwp_act_window,hwp_epp,md_clear,flush_l1d
      Clock: 2633 MHz
      BogoMips: 5184.00
      Cache: 6144 kb
      Units/Processor: 16
      Config Status: cfg=new, avail=yes, need=no, active=unknown
    .
    .
    .
    08: None 07.0: 10103 CPU
      [Created at cpu.462]
      Unique ID: OPYj.j8NaKXDZtZ6
      Hardware Class: cpu
      Arch: X86-64
      Vendor:"GenuineIntel"
      Model: 6.94.3"Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz"
      Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,syscall,nx,pdpe1gb,rdtscp,lm,constant_tsc,art,arch_perfmon,pebs,bts,rep_good,nopl,xtopology,nonstop_tsc,cpuid,aperfmperf,tsc_known_freq,pni,pclmulqdq,dtes64,monitor,ds_cpl,vmx,est,tm2,ssse3,sdbg,fma,cx16,xtpr,pdcm,pcid,sse4_1,sse4_2,x2apic,movbe,popcnt,tsc_deadline_timer,aes,xsave,avx,f16c,rdrand,lahf_lm,abm,3dnowprefetch,cpuid_fault,epb,invpcid_single,pti,ssbd,ibrs,ibpb,stibp,tpr_shadow,vnmi,flexpriority,ept,vpid,ept_ad,fsgsbase,tsc_adjust,bmi1,hle,avx2,smep,bmi2,erms,invpcid,rtm,mpx,rdseed,adx,smap,clflushopt,intel_pt,xsaveopt,xsavec,xgetbv1,xsaves,dtherm,ida,arat,pln,pts,hwp,hwp_notify,hwp_act_window,hwp_epp,md_clear,flush_l1d
      Clock: 2650 MHz
      BogoMips: 5184.00
      Cache: 6144 kb
      Units/Processor: 16
      Config Status: cfg=new, avail=yes, need=no, active=unknown

    5)如何使用hwinfo命令在Linux上显示网络接口信息

    要仅显示详细的网络接口信息,请在hwinfo命令中使用--network选项。

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    $ sudo hwinfo --network

    28: None 00.0: 10701 Ethernet                                  
      [Created at net.126]
      Unique ID: qzC0.ndpeucax6V1
      Parent ID: 9Ky7.AJPR6upK_K2
      SysFS ID: /class/net/enp9s0
      SysFS Device Link: /devices/pci0000:00/0000:00:1c.3/0000:09:00.0
      Hardware Class: network interface
      Model:"Ethernet network interface"
      Driver:"r8168"
      Driver Modules:"r8168"
      Device File: enp9s0
      HW Address: c8:5b:76:4d:d4:5c
      Permanent HW Address: c8:5b:76:4d:d4:5c
      Link detected: no
      Config Status: cfg=new, avail=yes, need=no, active=unknown
      Attached to: #4 (Ethernet controller)

    29: None 00.0: 10701 Ethernet
      [Created at net.126]
      Unique ID: ARo+.ndpeucax6V1
      Parent ID: VnX7.31oP+rtGKzC
      SysFS ID: /class/net/wlp8s0
      SysFS Device Link: /devices/pci0000:00/0000:00:1c.2/0000:08:00.0
      Hardware Class: network interface
      Model:"Ethernet network interface"
      Driver:"iwlwifi"
      Driver Modules:"iwlwifi"
      Device File: wlp8s0
      HW Address: e4:a7:a0:32:fc:e9
      Permanent HW Address: e4:a7:a0:32:fc:e9
      Link detected: yes
      Config Status: cfg=new, avail=yes, need=no, active=unknown
      Attached to: #7 (Ethernet controller)

    30: None 00.0: 10700 Loopback
      [Created at net.126]
      Unique ID: ZsBS.GQNx7L4uPNA
      SysFS ID: /class/net/lo
      Hardware Class: network interface
      Model:"Loopback network interface"
      Device File: lo
      Link detected: yes
      Config Status: cfg=new, avail=yes, need=no, active=unknown

    6)如何使用hwinfo命令在Linux上显示网卡信息

    要仅显示详细的网卡信息,请在hwinfo命令中使用--netcard选项。

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    $ sudo hwinfo --netcard

    10: PCI 900.0: 0200 Ethernet controller                        
      [Created at pci.386]
      Unique ID: 9Ky7.AJPR6upK_K2
      Parent ID: Z7uZ.KKaZqjE74P3
      SysFS ID: /devices/pci0000:00/0000:00:1c.3/0000:09:00.0
      SysFS BusID: 0000:09:00.0
      Hardware Class: network
      Model:"Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller"
      Vendor: pci 0x10ec"Realtek Semiconductor Co., Ltd."
      Device: pci 0x8168"RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller"
      SubVendor: pci 0x17aa"Lenovo"
      SubDevice: pci 0x3831
      Revision: 0x15
      Driver:"r8168"
      Driver Modules:"r8168"
      Device File: enp9s0
      I/O Ports: 0x4000-0x4fff (rw)
      Memory Range: 0x94104000-0x94104fff (rw,non-prefetchable)
      Memory Range: 0x94100000-0x94103fff (rw,non-prefetchable)
      IRQ: 139 (no events)
      HW Address: c8:5b:76:4d:d4:5c
      Permanent HW Address: c8:5b:76:4d:d4:5c
      Link detected: no
      Module Alias:"pci:v000010ECd00008168sv000017AAsd00003831bc02sc00i00"
      Driver Info #0:
        Driver Status: r8169 is not active
        Driver Activation Cmd:"modprobe r8169"
      Driver Info #1:
        Driver Status: r8168 is active
        Driver Activation Cmd:"modprobe r8168"
      Config Status: cfg=new, avail=yes, need=no, active=unknown
      Attached to: #18 (PCI bridge)

    13: PCI 800.0: 0282 WLAN controller
      [Created at pci.386]
      Unique ID: VnX7.5U5jxg3LUR0
      Parent ID: hoOk.pvdpL97QY03
      SysFS ID: /devices/pci0000:00/0000:00:1c.2/0000:08:00.0
      SysFS BusID: 0000:08:00.0
      Hardware Class: network
      Model:"Intel Dual Band Wireless-AC 8260"
      Vendor: pci 0x8086"Intel Corporation"
      Device: pci 0x24f3"Wireless 8260"
      SubVendor: pci 0x8086"Intel Corporation"
      SubDevice: pci 0x1010"Dual Band Wireless-AC 8260"
      Revision: 0x3a
      Driver:"iwlwifi"
      Driver Modules:"iwlwifi"
      Device File: wlp8s0
      Features: WLAN
      Memory Range: 0x94200000-0x94201fff (rw,non-prefetchable)
      IRQ: 141 (376425 events)
      HW Address: e4:a7:a0:32:fc:e9
      Permanent HW Address: e4:a7:a0:32:fc:e9
      Link detected: yes
      WLAN channels: 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140
      WLAN frequencies: 2.412 2.417 2.422 2.427 2.432 2.437 2.442 2.447 2.452 2.457 2.462 2.467 2.472 5.18 5.2 5.22 5.24 5.26 5.28 5.3 5.32 5.5 5.52 5.54 5.56 5.58 5.6 5.62 5.64 5.66 5.68 5.7
      WLAN encryption modes: WEP40 WEP104 TKIP CCMP
      WLAN authentication modes: open sharedkey wpa-psk wpa-eap
      Module Alias:"pci:v00008086d000024F3sv00008086sd00001010bc02sc80i00"
      Driver Info #0:
        Driver Status: iwlwifi is active
        Driver Activation Cmd:"modprobe iwlwifi"
      Config Status: cfg=new, avail=yes, need=no, active=unknown
      Attached to: #25 (PCI bridge)

    7)如何使用hwinfo命令在Linux上显示磁盘信息

    要仅显示详细的硬盘信息,请在hwinfo命令中使用--disk选项。 它包括设备文件名,设备文件路径,bois ID,设备号等。

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    $ sudo hwinfo --disk

    21: PCI 00.0: 10600 Disk                                        
      [Created at block.245]
      Unique ID: wLCS.8qcPkkehlG5
      Parent ID: cuhJ.bG_CoARfDl8
      SysFS ID: /class/block/nvme0n1
      SysFS BusID: nvme0
      SysFS Device Link: /devices/pci0000:00/0000:00:1d.0/0000:0a:00.0/nvme/nvme0
      Hardware Class: disk
      Model:"Samsung Electronics NVMe SSD Controller SM951/PM951"
      Vendor: pci 0x144d"Samsung Electronics Co Ltd"
      Device: pci 0xa802"NVMe SSD Controller SM951/PM951"
      SubVendor: pci 0x144d"Samsung Electronics Co Ltd"
      SubDevice: pci 0xa801
      Driver:"nvme"
      Driver Modules:"nvme"
      Device File: /dev/nvme0n1
      Device Files: /dev/nvme0n1, /dev/disk/by-id/nvme-SAMSUNG_MZVLV256HCHP-000L2_S27WNX0H825853, /dev/disk/by-path/pci-0000:0a:00.0-nvme-1, /dev/disk/by-id/nvme-nvme.144d-533237574e583048383235383533-53414d53554e47204d5a564c56323536484348502d3030304c32-00000001
      Device Number: block 259:0
      Geometry (Logical): CHS 244198/64/32
      Size: 500118192 sectors a 512 bytes
      Capacity: 238 GB (256060514304 bytes)
      Config Status: cfg=new, avail=yes, need=no, active=unknown
      Attached to: #11 (Non-Volatile memory controller)

    22: IDE 200.0: 10600 Disk
      [Created at block.245]
      Unique ID: 3OOL.ZmzURTCA6R5
      Parent ID: abAj.2LUt5+ExdH3
      SysFS ID: /class/block/sda
      SysFS BusID: 2:0:0:0
      SysFS Device Link: /devices/pci0000:00/0000:00:17.0/ata3/host2/target2:0:0/2:0:0:0
      Hardware Class: disk
      Model:"WDC WD10SPCX-24H"
      Vendor:"WDC"
      Device:"WD10SPCX-24H"
      Revision:"1A02"
      Serial ID:"WD-WXD1A36RE0LP"
      Driver:"ahci","sd"
      Driver Modules:"ahci","sd_mod"
      Device File: /dev/sda
      Device Files: /dev/sda, /dev/disk/by-id/wwn-0x50014ee65c0cfab4, /dev/disk/by-id/ata-WDC_WD10SPCX-24HWST1_WD-WXD1A36RE0LP, /dev/disk/by-path/pci-0000:00:17.0-ata-3
      Device Number: block 8:0-8:15
      Geometry (Logical): CHS 121601/255/63
      Size: 1953525168 sectors a 512 bytes
      Capacity: 931 GB (1000204886016 bytes)
      Config Status: cfg=new, avail=yes, need=no, active=unknown
      Attached to: #2 (SATA controller)

    8)如何使用hwinfo命令在Linux上显示分区信息

    要仅显示详细的硬盘分区信息,请在hwinfo命令中使用--partition选项。

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    $ sudo hwinfo --partition

    22: None 00.0: 11300 Partition                                  
      [Created at block.434]
      Unique ID: cS_q.SE1wIdpsiiC
      Parent ID: wLCS.8qcPkkehlG5
      SysFS ID: /class/block/nvme0n1/nvme0n1p1
      Hardware Class: partition
      Model:"Partition"
      Device File: /dev/nvme0n1p1
      Device Files: /dev/nvme0n1p1, /dev/disk/by-id/nvme-nvme.144d-533237574e583048383235383533-53414d53554e47204d5a564c56323536484348502d3030304c32-00000001-part1, /dev/disk/by-partuuid/3000191b-01, /dev/disk/by-uuid/69d9dd18-36be-4631-9ebb-78f05fe3217f, /dev/disk/by-path/pci-0000:0a:00.0-nvme-1-part1, /dev/disk/by-id/nvme-SAMSUNG_MZVLV256HCHP-000L2_S27WNX0H825853-part1
      Config Status: cfg=new, avail=yes, need=no, active=unknown
      Attached to: #21 (Disk)

    23: None 00.0: 11300 Partition
      [Created at block.434]
      Unique ID: 3eEv.SE1wIdpsiiC
      Parent ID: wLCS.8qcPkkehlG5
      SysFS ID: /class/block/nvme0n1/nvme0n1p2
      Hardware Class: partition
      Model:"Partition"
      Device File: /dev/nvme0n1p2
      Device Files: /dev/nvme0n1p2, /dev/disk/by-partuuid/3000191b-02, /dev/disk/by-id/nvme-nvme.144d-533237574e583048383235383533-53414d53554e47204d5a564c56323536484348502d3030304c32-00000001-part2, /dev/disk/by-uuid/a2092b92-af29-4760-8e68-7a201922573b, /dev/disk/by-path/pci-0000:0a:00.0-nvme-1-part2, /dev/disk/by-id/nvme-SAMSUNG_MZVLV256HCHP-000L2_S27WNX0H825853-part2
      Config Status: cfg=new, avail=yes, need=no, active=unknown
      Attached to: #21 (Disk)

    25: None 00.0: 11300 Partition
      [Created at block.434]
      Unique ID: bdUI.SE1wIdpsiiC
      Parent ID: 3OOL.ZmzURTCA6R5
      SysFS ID: /class/block/sda/sda1
      Hardware Class: partition
      Model:"Partition"
      Device File: /dev/sda1
      Device Files: /dev/sda1, /dev/disk/by-id/ata-WDC_WD10SPCX-24HWST1_WD-WXD1A36RE0LP-part1, /dev/disk/by-partlabel/Microsoft\x20reserved\x20partition, /dev/disk/by-id/wwn-0x50014ee65c0cfab4-part1, /dev/disk/by-partuuid/41fdd500-aed7-4574-9f4d-908a8a444a9f, /dev/disk/by-path/pci-0000:00:17.0-ata-3-part1
      Config Status: cfg=new, avail=yes, need=no, active=unknown
      Attached to: #24 (Disk)

    26: None 00.0: 11300 Partition
      [Created at block.434]
      Unique ID: 2pkM.SE1wIdpsiiC
      Parent ID: 3OOL.ZmzURTCA6R5
      SysFS ID: /class/block/sda/sda2
      Hardware Class: partition
      Model:"Partition"
      Device File: /dev/sda2
      Device Files: /dev/sda2, /dev/disk/by-uuid/480AF3410AF32A98, /dev/disk/by-id/ata-WDC_WD10SPCX-24HWST1_WD-WXD1A36RE0LP-part2, /dev/disk/by-path/pci-0000:00:17.0-ata-3-part2, /dev/disk/by-partuuid/819eef31-7326-44a9-b294-87ecb29f1869, /dev/disk/by-partlabel/Basic\x20data\x20partition, /dev/disk/by-label/DATA, /dev/disk/by-id/wwn-0x50014ee65c0cfab4-part2
      Config Status: cfg=new, avail=yes, need=no, active=unknown
      Attached to: #24 (Disk)

    9)如何使用hwinfo命令在Linux上显示USB设备控制器信息

    要显示详细的USB设备信息,请在hwinfo命令中使用--usb选项。

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    $ sudo hwinfo --usb

    03: USB 00.0: 0000 Unclassified device                          
      [Created at usb.122]
      Unique ID: MtLc.kyeWJxUnIlB
      Parent ID: k4bc.2DFUsyrieMD
      SysFS ID: /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0
      SysFS BusID: 1-6:1.0
      Hardware Class: unknown
      Model:"Syntek Lenovo EasyCamera"
      Hotplug: USB
      Vendor: usb 0x174f"Syntek"
      Device: usb 0x14e8"Lenovo EasyCamera"
      Revision:"12.18"
      Serial ID:"200901010001"
      Driver:"uvcvideo"
      Driver Modules:"uvcvideo"
      Device File: /dev/input/event12
      Device Files: /dev/input/event12, /dev/input/by-id/usb-160709000341_Lenovo_EasyCamera_200901010001-event-if00, /dev/input/by-path/pci-0000:00:14.0-usb-0:6:1.0-event
      Device Number: char 13:76
      Speed: 480 Mbps
      Module Alias:"usb:v174Fp14E8d1218dcEFdsc02dp01ic0Eisc01ip00in00"
      Driver Info #0:
        Driver Status: uvcvideo is active
        Driver Activation Cmd:"modprobe uvcvideo"
      Config Status: cfg=new, avail=yes, need=no, active=unknown
      Attached to: #6 (Hub)
    .
    .
    10: USB 00.0: 10a00 Hub
      [Created at usb.122]
      Unique ID: pBe4.xYNhIwdOaa6
      SysFS ID: /devices/pci0000:00/0000:00:14.0/usb2/2-0:1.0
      SysFS BusID: 2-0:1.0
      Hardware Class: hub
      Model:"Linux Foundation 3.0 root hub"
      Hotplug: USB
      Vendor: usb 0x1d6b"Linux Foundation"
      Device: usb 0x0003"3.0 root hub"
      Revision:"4.19"
      Serial ID:"0000:00:14.0"
      Driver:"hub"
      Driver Modules:"usbcore"
      Module Alias:"usb:v1D6Bp0003d0419dc09dsc00dp03ic09isc00ip00in00"
      Config Status: cfg=new, avail=yes, need=no, active=unknown

    10)如何使用hwinfo命令在Linux上显示内存信息

    要显示详细的详细内存信息,请在hwinfo命令中使用--memory选项。

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    $ sudo hwinfo --memory

    01: None 00.0: 10102 Main Memory                                
      [Created at memory.74]
      Unique ID: rdCR.CxwsZFjVASF
      Hardware Class: memory
      Model:"Main Memory"
      Memory Range: 0x00000000-0x3dfbd5fff (rw)
      Memory Size: 15 GB
      Config Status: cfg=new, avail=yes, need=no, active=unknown

    11)如何在Linux上使用hwinfo命令显示PCI设备控制器信息

    要显示详细的pci设备信息,请在hwinfo命令中使用--pci选项。

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    $ sudo hwinfo --pci

    07: PCI 17.0: 0106 SATA controller (AHCI 1.0)                  
      [Created at pci.386]
      Unique ID: abAj.2LUt5+ExdH3
      SysFS ID: /devices/pci0000:00/0000:00:17.0
      SysFS BusID: 0000:00:17.0
      Hardware Class: storage
      Model:"Intel HM170/QM170 Chipset SATA Controller [AHCI Mode]"
      Vendor: pci 0x8086"Intel Corporation"
      Device: pci 0xa103"HM170/QM170 Chipset SATA Controller [AHCI Mode]"
      SubVendor: pci 0x17aa"Lenovo"
      SubDevice: pci 0x3802
      Revision: 0x31
      Driver:"ahci"
      Driver Modules:"ahci"
      Memory Range: 0x94428000-0x94429fff (rw,non-prefetchable)
      Memory Range: 0x9442d000-0x9442d0ff (rw,non-prefetchable)
      I/O Ports: 0x6080-0x6087 (rw)
      I/O Ports: 0x6088-0x608b (rw)
      I/O Ports: 0x6060-0x607f (rw)
      Memory Range: 0x9442b000-0x9442b7ff (rw,non-prefetchable)
      IRQ: 138 (425 events)
      Module Alias:"pci:v00008086d0000A103sv000017AAsd00003802bc01sc06i01"
      Driver Info #0:
        Driver Status: ahci is active
        Driver Activation Cmd:"modprobe ahci"
      Config Status: cfg=new, avail=yes, need=no, active=unknown
    .
    .
    25: PCI 1c.2: 0604 PCI bridge (Normal decode)
      [Created at pci.386]
      Unique ID: hoOk.pvdpL97QY03
      SysFS ID: /devices/pci0000:00/0000:00:1c.2
      SysFS BusID: 0000:00:1c.2
      Hardware Class: bridge
      Model:"Intel 100 Series/C230 Series Chipset Family PCI Express Root Port #3"
      Vendor: pci 0x8086"Intel Corporation"
      Device: pci 0xa112"100 Series/C230 Series Chipset Family PCI Express Root Port #3"
      SubVendor: pci 0x17aa"Lenovo"
      SubDevice: pci 0x3802
      Revision: 0xf1
      Driver:"pcieport"
      IRQ: 124 (no events)
      Module Alias:"pci:v00008086d0000A112sv000017AAsd00003802bc06sc04i00"
      Config Status: cfg=new, avail=yes, need=no, active=unknown

    12)如何将hwinfo输出导出到文件

    hwinfo提供了log选项,该选项用于将hwinfo输出存储在文件中以供以后分析。 如果要导出特定的硬件信息输出,则可以指定-选项。

    1
    $ sudo hwinfo --log hwinfo.txt

    13)如何访问hwinfo帮助页面

    要了解有关hwinfo的更多信息,请转到hwinfo帮助部分或手册页。

    1
    $ hwinfo --help