Làm cách nào để biết trình điều khiển Wi-Fi nào được cài đặt?


22

Tôi biết lsmod, nhưng làm thế nào để tôi biết lái xe nào làm gì?

Câu trả lời:


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

Nói cách khác, /syshệ thống phân cấp cho thiết bị ( /sys/class/net/$interface/device) chứa liên kết tượng trưng đến /sysphân cấp cho trình điều khiển. Ở đó, bạn cũng sẽ tìm thấy một liên kết tượng trưng cho /syshệ thống phân cấp cho mô-đun, nếu có. Điều này áp dụng cho hầu hết các thiết bị, không chỉ giao diện không dây.


4
Hoặc basename $( readlink /sys/class/net/eth0/device/driver ).
— mattdm

14

Có thể có một cách tốt hơn, nhưng tôi đã sử dụng lshw -class network( với quyền root ) và nó mang lại cho tôi kết quả này:

  *-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

Bạn có thể grep cho drivertừ đầu ra đó. Trong trường hợp của tôi, tôi sử dụng lsmod | grep iwlagn, đưa cho tôi:

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

Đừng hỏi tôi ý nghĩa của từng thứ đó :)


Cảm ơn. Tôi đã thử sử dụng lshw, nhưng trình điều khiển đã bị mất trong tất cả các cấu hình khác. :)
— apoorv020

1
PS, cột thứ 4 là cột phụ thuộc và cột thứ 3 là tổng của các phụ thuộc này. Một trình điều khiển thường bao gồm một số tệp .ko khác nhau, mỗi tệp có một tệp tương ứng lsmod.
— apoorv020

3

Nếu bạn quan tâm đến các thiết bị WiFi dựa trên USB thì bạn có thể thấy tên trình điều khiển bằng cách sử dụng lsusblệnh:

lsusb -t
Khi sử dụng trang web của chúng tôi, bạn xác nhận rằng bạn đã đọc và hiểu Chính sách cookie và Chính sách bảo mật của chúng tôi.
Licensed under cc by-sa 3.0 with attribution required.