Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the use of the lsusb command in Linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article is to share with you about the use of the lsusb command in Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

The Linux common command lsusb command is used to display a list of native USB devices, as well as details of USB devices.

Lsusb displays local USB device list information

Add that the lsusb command is an assistant for learning USB driver development and understanding USB devices. It is recommended that you use it. If there is no lsusb command in your development board or product, you can transplant one and put it into the file system.

Syntax lsusb (option) option-v: displays details of USB devices;-s displays only devices with specified bus and / or device numbers;-d: displays only devices with specified vendor and product numbers;-t: displays the hierarchy of unreasonable USB devices in a tree structure;-V: displays the version information of the command. The output of lsusb after the instance is inserted into the usb mouse is as follows:

Bus 005 Device 001: id 0000 Device 0000 Bus 001 Device 001: ID 0000Vo 0000 Bus 004 Device 001: ID 0000Vo 0000 Bus 003 Device 001: ID 0000Vo 0000 Bus 002 Device 006: ID 15d9:0a37 Bus 002 Device 001: ID 0000V0000 explain:

Bus 005

Represents the fifth usb master controller (there are a total of 5 usb master controllers on the machine-which can be viewed by lspci | grep USB)

Device 006

Indicates the device number (devnum) assigned by the system to the usb mouse, and you can also see that the mouse is plugged into the second usb master controller

006 usb_device.devnum / sys/devices/pci0000:00/0000:00:1d.1/usb2/2-2/devnumID 15d9:0a37

Represents the ID of the usb device (this ID is set by the chip manufacturer and can uniquely represent the device)

15d9 usb_device_descriptor.idVendor 0a37 usb_device_descriptor.idProduct / sys/devices/pci0000:00/0000:00:1d.1/usb2/2-2/idVendorBus 002 Device 006: ID 15d9:0a37 Bus 002 Device 001: ID 0000VOO000

Indicates that two devices are connected to the usb host controller 002:

One is the usb root Hub-001.

One is usb mouse-006.

Thank you for reading! This is the end of this article on "what is the use of lsusb commands in Linux?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report