如何找出某个硬件正在使用哪个驱动程序?

Oli*_*Oli 10 diagnostic

今天我试图找出哪种驱动程序最适合我的 USB 无线加密狗。我所看到的每一处我​​都只看到Ralink STA但这并没有告诉我这实际上是哪个模块。

我确定有一种查找方法,但计算机应该能够告诉我,不是吗?

Meta:这个问题对任何硬件都是开放的,而不仅仅是我的无线网卡。如果我们有一个有用的诊断程序线程会很有帮助,这样其他人就可以了解他们的硬件发生了什么。

Oli*_*Oli 10

小白

lshw是一个非常有用的工具,用于查找有关所有硬件的详细信息。它应该能够告诉你各种各样的废话——有些有用,有些没有。就我而言,以下是sudo lshw -c network关于我的有线卡的信息:

  *-network
       description: Ethernet interface
       product: RTL8111/8168B PCI Express Gigabit Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:09:00.0
       logical name: eth1
       version: 03
       serial: xx:xx:xx:xx:xx:xx
       size: 10Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half latency=0 link=no multicast=yes port=MII speed=10Mbit/s
       resources: ...
Run Code Online (Sandbox Code Playgroud)

司机被埋在configuration:靠近尽头的路段。

如果您只想快速列出正在使用的模块,可以使用以下命令:

sudo lshw | grep -Eo 'driver=[^ ]+' | sort -u | cut -d\= -f2
Run Code Online (Sandbox Code Playgroud)


Rol*_*Xor 7

您可以安装 hardinfo 并浏览各种硬件类别,以获取有关列表中每个设备使用的驱动程序的信息。

截屏:
在此处输入图片说明