如何找出安装了哪个Wi-Fi驱动程序?


Answers:


28
$ readlink /sys/class/net/wlan0/device/driver
../../../../bus/pci/drivers/ath5k

换句话说,/sys设备(/sys/class/net/$interface/device)的/sys层次结构包含指向驱动程序层次结构的符号链接。/sys如果适用,您还将在此处找到到模块层次结构的符号链接。这适用于大多数设备,而不仅仅是无线接口。


4
或者basename $( readlink /sys/class/net/eth0/device/driver )
mattdm 2011年

14

也许有更好的方法,但是我使用了lshw -class network作为root),它给了我以下输出:

  *-network               
       description: Ethernet interface
       product: 82566MM Gigabit Network Connection
       vendor: Intel Corporation
       physical id: 19
       bus info: pci@0000:00:19.0
       logical name: eth0
       version: 03
       serial: 00:a0:d1:a3:87:c8
       size: 1GB/s
       capacity: 1GB/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=1.0.2-k2 duplex=full firmware=0.3-0 ip=192.168.2.206 latency=0 link=yes multicast=yes port=twisted pair speed=1GB/s
       resources: irq:29 memory:fc300000-fc31ffff memory:fc325000-fc325fff ioport:1840(size=32)
  *-network
       description: Wireless interface
       product: PRO/Wireless 4965 AG or AGN [Kedron] Network Connection
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:06:00.0
       logical name: wlan0
       version: 61
       serial: 00:1d:e0:69:28:07
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlagn ip=192.168.0.104 latency=0 multicast=yes wireless=IEEE 802.11abgn
       resources: irq:31 memory:c8000000-c8001fff
  *-network DISABLED
       description: Ethernet interface
       physical id: 3
       logical name: vboxnet0
       serial: 0a:00:27:00:00:00
       capabilities: ethernet physical
       configuration: broadcast=yes multicast=yes

您可以driver从该输出中获取grep 。就我而言,我使用lsmod | grep iwlagn,给我:

iwlagn                 63559  0 
iwlcore                67702  1 iwlagn
mac80211              123574  2 iwlagn,iwlcore
cfg80211               87657  3 iwlagn,iwlcore,mac80211

不要问我这些是什么意思:)


谢谢。我曾尝试使用lshw,但是驱动程序在所有其他配置中都丢失了。:)
apoorv020 2011年

1
PS,第4列是依赖项列,第3列是这些依赖项的总和。一个驱动程序通常由几个不同的.ko文件组成,每个文件都有一个相应的in lsmod
apoorv020 2011年

3

如果您对基于USB的WiFi设备感兴趣,则可以使用以下lsusb命令查看驱动程序名称:

lsusb -t
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.