怎么查看usb读取信息_Linux系统怎么查看USB设备

请关注本头条号,每天坚持更新原创干货技术文章。

如需学习视频,请在微信搜索公众号“智传网优”直接开始自助视频学习。

了解lsusb命令

Linux使用lsusb查看USB设备信息。

ae0693c802f41968fa9e35aa4846ffd2.png

安装工具:

[root@zcwyou ~]# yum -y install usbutils
9dccd1b5ae37cabe866851b1ff1b4da6.png

1. 查看USB设备汇总信息

命令:

[root@zcwyou ~]# lsusb

输出:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

36dbc515d888a1a762dbf35c870acab6.png

2.查看USB详细信息

命令

[root@zcwyou ~]# lsusb -v

部分输出结果:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Device Descriptor:

bLength 18

bDescriptorType 1

bcdUSB 2.00

bDeviceClass 9 Hub

bDeviceSubClass 0 Unused

bDeviceProtocol 0 Full speed (or root) hub

bMaxPacketSize0 64

idVendor 0x1d6b Linux Foundation

idProduct 0x0002 2.0 root hub

bcdDevice 2.06

iManufacturer 3 Linux 2.6.32-431.el6.x8664 ehcihcd

iProduct 2 EHCI Host Controller

iSerial 1 0000:00:1d.7

bNumConfigurations 1

Configuration Descriptor:

bLength 9

bDescriptorType 2

wTotalLength 25

bNumInterfaces 1

bConfigurationValue 1

iConfiguration 0

bmAttributes 0xe0

Self Powered

Remote Wakeup

MaxPower 0mA

Interface Descriptor:

bLength 9

bDescriptorType 4

bInterfaceNumber 0

bAlternateSetting 0

bNumEndpoints 1

bInterfaceClass 9 Hub

bInterfaceSubClass 0 Unused

bInterfaceProtocol 0 Full speed (or root) hub

iInterface 0

Endpoint Descriptor:

bLength 7

bDescriptorType 5

bEndpointAddress 0x81 EP 1 IN

bmAttributes 3

Transfer Type Interrupt

Synch Type None

Usage Type Data

wMaxPacketSize 0x0004 1x 4 bytes

bInterval 12

Hub Descriptor:

bLength 11

bDescriptorType 41

nNbrPorts 8

wHubCharacteristic 0x000a

No power switching (usb 1.0)

Per-port overcurrent protection

bPwrOn2PwrGood 10 * 2 milli seconds

bHubContrCurrent 0 milli Ampere

DeviceRemovable 0x00 0x00

PortPwrCtrlMask 0xff 0xff

Hub Port Status:

Port 1: 0000.0100 power

Port 2: 0000.0100 power

Port 3: 0000.0100 power

Port 4: 0000.0100 power

Port 5: 0000.0100 power

Port 6: 0000.0100 power

Port 7: 0000.0100 power

Port 8: 0000.0100 power

Device Status: 0x0003

Self Powered

Remote Wakeup Enabled

c8fc76011ded3585b32bbb13c0944fcb.png

3. 树状输出信息

命令:

[root@zcwyou ~]# lsusb -t

输出结果:

/: Bus 05.Port 1: Dev 1, Class=roothub, Driver=uhcihcd/2p, 12M

/: Bus 04.Port 1: Dev 1, Class=roothub, Driver=uhcihcd/2p, 12M

/: Bus 03.Port 1: Dev 1, Class=roothub, Driver=uhcihcd/2p, 12M

/: Bus 02.Port 1: Dev 1, Class=roothub, Driver=uhcihcd/2p, 12M

/: Bus 01.Port 1: Dev 1, Class=roothub, Driver=ehcihcd/8p, 480M

9d7cedb503de4acb28fd587b0529e526.png

总结:Linux使用lsusb专门查询USB信息。

原文链接:

https://www.linuxrumen.com/cyml/384.html

点击了解更多,快速查看更多的技术文章列表。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值