System and processes
The lsusb command
Lists the devices connected to the USB ports: keyboards, mice, drives, webcams and hubs. It shows the bus, the device number and the vendor:product identifier. It is the quickest way to check whether the system has detected a device.
Most useful options
-tShows devices as a tree, with the hub each one is connected to-vVerbose output of each device descriptor. Some data requires root-d VENDEDOR:PRODUCTOFilters by identifier, for example -d 046d: for all Logitech devices-s BUS:DISPOSITIVOShows only one device, by bus and number, for example 002:003Copy-ready examples
$ lsusblists all USB devices with their identifier.Example output
Bus 002 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
$ lsusb -tdraws the hub tree and shows the speed of each port.Example output
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
|__ Port 1: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M$ lsusb -d 046d:shows only the devices from the vendor Logitech (ID 046d).Example output
Bus 002 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
You can try them in the browser terminal: it does not touch your computer.
Common errors
| Message | Cause | Fix |
|---|---|---|
| No error message | Without permissions, some devices cannot be read and appear without a name or with incomplete data. | Use sudo lsusb -v if you need the full detail. |
| No error message | The -d filter does not match any connected device. | Remove the filter and find the correct identifier in the lsusb output. |
| bash: lsusb: command not found | The command is not installed. On Debian and Ubuntu it comes in the usbutils package. | Install it with sudo apt install usbutils. |
Typical mistakes
- Two identical devices share the same vendor:product identifier. To tell them apart use bus and number.
- The bus and device number change every time you reconnect the device, so they are no good for fixed rules.
- Commercial names come from a database (usb.ids). A little-known manufacturer may show without a name.
- A USB hub appears in the list as a device, next to the peripherals connected to it.
Differences from similar commands
- lspci: lists the internal PCI bus: graphics cards, network and controllers. lsusb only looks at USB.
- lsblk: lists disks and partitions. A USB disk appears in lsusb as a device and in lsblk as a disk.
- lsmod: shows the kernel modules already loaded. If a device does not work, check whether its module appears there.
FAQ
How do I know whether a USB drive is connected?
Run lsusb before and after plugging it in and compare the two outputs. The new line is the device.
What does the ID 046d:c52b mean?
The vendor is 046d (Logitech) and the product c52b, a specific model. Each model has its own pair.
How do I create a udev rule for a device?
Use the vendor:product identifier, never the bus number, because it changes when you reconnect.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course