如何查看LINUX下的一个USB设备使用的驱动模块

 我来答
yexicheng
2016-12-14 · TA获得超过1.2万个赞
知道大有可为答主
回答量:8857
采纳率:69%
帮助的人:7095万
展开全部
Method 1: Using usbutils (easy)
The usbutils package (on Debian, at least) includes a script called usb-devices. If you run it, it outputs information about the devices on the system, including which driver is used:
$ usb-devices

T: Bus=10 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 3 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=051d ProdID=0002 Rev=01.06
S: Manufacturer=American Power Conversion
S: Product=Back-UPS RS 1500 FW:8.g9 .D USB FW:g9
S: SerialNumber=XXXXXXXXXXXX
C: #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=24mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbfs


Note that this lists the current driver, not the default one. There isn't a way to find the default one.
Method 2: Using debugfs (requires root)
If you have debugfs mounted, the kernel maintains a file in the same format as usb-devices prints out at /sys/kernel/debug/usb/devices; you can view with less, etc. Note that debugfs interfaces are not stable, so different kernel versions may print in a different format, or be missing the file entirely.
Once again, this only shows the current driver, not the default.
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式