Display Information About USB Devices on Linux with lsusb
How to Display Information About USB Devices on Linux
Learn how to identify USB devices on Linux with lsusb, USB topology, kernel logs, sysfs, udev, storage tools, and troubleshooting commands.
Linux provides several ways to inspect USB hardware. You can identify a device model, determine where it is connected, find the driver and interface in use, locate its Linux device node, and diagnose power or enumeration failures.
This lesson assumes basic terminal use, Linux paths, the /dev directory, removable storage, and the purpose of sudo.
USB device identification basics
USB, or Universal Serial Bus, is both a physical connection standard and a communication protocol. Linux organizes USB hardware in a hierarchy: a host controller connects to a root hub, the root hub exposes ports, and external hubs can add more downstream ports.
A physical USB peripheral is not the same thing as its Linux representation. A single physical device can expose several USB interfaces and create one or more device nodes or subsystem objects. For example, a USB webcam is a physical USB device, but applications usually access it through a video device such as /dev/video0. A USB storage device may create a block device such as /dev/sdb and partitions such as /dev/sdb1.
Common USB identity fields include:
- VID: the hexadecimal vendor ID assigned to the manufacturer.
- PID: the hexadecimal product ID associated with a device model or product variant.
- VID:PID: the vendor and product pair, such as
1234:5678. - Manufacturer and product: descriptive strings supplied by the device.
- Serial number: a device-provided value that may distinguish one physical unit from another.
- Device class: a standardized functional category such as mass storage, HID, audio, video, or communications.
- USB version or negotiated speed: information about the supported or currently negotiated USB generation and connection speed.
USB enumeration is the process in which the host detects a device, reads its descriptors, assigns an address, configures its interfaces, and loads suitable kernel support.
List devices with lsusb
The lsusb command lists USB devices that Linux has detected at the USB protocol level.
lsusbA typical line resembles:
Bus 002 Device 004: ID 1234:5678 Example Devices USB Storage- Bus 002 is the Linux-assigned USB bus.
- Device 004 is the current address assigned to the device during enumeration. It can change after unplugging and reconnecting the device.
- 1234:5678 is the hexadecimal VID:PID pair.
- The remaining text is the manufacturer and product description, when available.
Use verbose output to inspect USB descriptors, configurations, interfaces, endpoint information, class codes, and sometimes driver associations.
lsusb -vVerbose output can be large. To inspect one VID:PID pair, use:
lsusb -d 1234:5678For more complete descriptor information, especially on systems that restrict access to some USB attributes, try:
sudo lsusb -v -d 1234:5678View USB topology with a tree
Use lsusb -t to display hubs and devices as a tree.
lsusb -tThe tree can show host-controller root hubs, external hubs, downstream ports, connection speed, USB class, and sometimes the driver bound to an interface. A simplified structure looks like this:
Host controller
└── Root hub
├── Port 1: keyboard
└── Port 2: external hub
├── Port 1: flash drive
└── Port 2: webcamTopology is especially useful when a peripheral is connected through a dock, monitor, adapter, or powered hub. It helps answer questions such as:
- Which hub and port lead to the device?
- Is the device connected directly or through several hubs?
- What speed did the connection negotiate?
- Could several high-bandwidth devices be sharing one upstream connection?
- Does moving the device to a different port change its parent hub or speed?
Inspect kernel detection messages
The kernel records USB connection, enumeration, reset, driver, and power events. On systems using systemd's journal, search kernel messages with:
journalctl -kjournalctl -k --grep=usb
Follow new kernel messages live, then connect or disconnect the device:
sudo journalctl -kfOn systems where access is permitted, dmesg provides another live view:
sudo dmesg -wUseful messages may show that a device was detected, assigned a USB address, identified by VID:PID, attached to a driver, or assigned a functional node such as /dev/sdb or /dev/ttyUSB0.
usb 2-1: new SuperSpeed USB device number 4 using xhci_hcd
usb 2-1: New USB device found, idVendor=1234, idProduct=5678
usb-storage 2-1:1.0: USB Mass Storage device detected
scsi host6: usb-storage 2-1:1.0
sd 6:0:0:0: [sdb] Attached SCSI removable diskErrors such as descriptor read failures, repeated resets, insufficient power, or rapid connect and disconnect cycles often appear here before a device becomes visible to higher-level tools.
Inspect USB data through sysfs and udev
sysfs is the virtual filesystem, normally mounted at /sys, where the kernel exposes devices and attributes. USB entries are found under /sys/bus/usb/devices. Names such as 2-1 describe a device attached to port 1 of bus 2; names with a suffix such as 2-1:1.0 usually describe an interface.
Read focused attributes rather than dumping the entire hierarchy:
cat /sys/bus/usb/devices/2-1/idVendor
cat /sys/bus/usb/devices/2-1/idProduct
cat /sys/bus/usb/devices/2-1/manufacturer
cat /sys/bus/usb/devices/2-1/product
cat /sys/bus/usb/devices/2-1/serial
cat /sys/bus/usb/devices/2-1/speedAttribute availability varies. A device may omit a serial number or descriptive strings. To explore available USB attributes, use:
find /sys/bus/usb/devices/2-1 -maxdepth 1 -type f -printudev is the device manager that creates device nodes under /dev and supplies properties used by applications and rules. Inspect a known functional device node with:
udevadm info --query=all --name=/dev/sdb
udevadm info --query=all --name=/dev/ttyUSB0To walk from a functional device toward its parent devices and USB attributes, use:
udevadm info --attribute-walk --name=/dev/sdbProperties such as manufacturer, model, VID, PID, and serial number can support persistent identification and automation. Prefer these stable properties over temporary bus and device numbers.
Find the operating-system representation
After identifying a USB device with lsusb, determine which Linux subsystem represents its function.
| Peripheral type | Typical USB class or driver | Possible Linux path or interface | Useful follow-up tool |
|---|---|---|---|
| Flash drive or external disk | Mass storage, often usb-storage or UAS | /dev/sdX, with partitions such as /dev/sdX1 | lsblk, blkid |
| Keyboard, mouse, or game controller | HID | Input subsystem paths under /dev/input | udevadm, input-device inspection tools |
| Webcam | Video class, commonly handled by a video driver | /dev/video0 or another video node | udevadm, video-device tools |
| USB-to-serial adapter | USB serial or communications class | /dev/ttyUSB0 or /dev/ttyACM0 | udevadm, kernel journal |
| USB network adapter | Communications or vendor-specific networking driver | A network interface such as enx... | ip link, udevadm |
| USB audio device | Audio class | Sound-card and mixer subsystem objects | Kernel journal, sound-device tools |
The same physical peripheral can expose multiple functions. For example, a docking station may provide storage, audio, networking, and HID interfaces. The USB listing identifies the parent device, while subsystem tools reveal each functional interface.
USB storage device details
Use block-device tools to distinguish a whole disk from its partitions and to inspect filesystems and mount points.
lsblk -o NAME,MODEL,TRAN,SIZE,FSTYPE,MOUNTPOINTSExample output might show:
NAME MODEL TRAN SIZE FSTYPE MOUNTPOINTS
sdb Example Flash usb 58G
└─sdb1 usb 58G exfat /media/user/USBHere, /dev/sdb is the whole removable disk. /dev/sdb1 is a partition containing a filesystem. A disk can have several partitions, and a whole disk does not necessarily have a mount point.
For filesystem labels, UUIDs, and type information, use:
sudo blkidBefore mounting, formatting, partitioning, or writing to removable storage, verify the device using several clues: USB model and serial, transport type, capacity, partition layout, and current mount point. Never assume that the next device letter is the intended disk.
Drivers, interfaces, and device classes
A USB device can contain multiple interfaces. An interface is a functional portion of the device that can be claimed by a driver. A kernel module is a loadable component that provides support for hardware or a protocol.
Common USB device classes include:
- Mass storage for disks and flash drives.
- HID, or Human Interface Device, for keyboards, mice, and controllers.
- Audio for microphones, headsets, and USB sound cards.
- Video for webcams and capture devices.
- Communications for networking and modem functions.
- USB serial for adapters that provide serial ports.
Use verbose lsusb output and the kernel journal to identify interfaces and drivers. The topology view may also include driver names:
lsusb -t
sudo lsusb -v -d 1234:5678
journalctl -k --grep='usb|tty|video|scsi'A device can be visible in lsusb even when a functional driver is missing. In that case, USB enumeration succeeded, but applications may have no usable block, input, serial, video, audio, or network interface.
Permissions and privilege
Ordinary users can usually run lsusb, lsusb -t, lsblk, and many udevadm queries. Full descriptor output, kernel logs, and some sysfs attributes may require elevated privileges:
sudo lsusb -v
sudo journalctl -k
sudo blkidAccess to serial nodes is commonly controlled by ownership and groups. Check the node and your group membership:
ls -l /dev/ttyUSB0
idRemovable-media access may also be controlled by desktop policy, udev rules, or a device-management service. Follow the distribution's normal group and policy configuration instead of changing permissions broadly.
Stable versus temporary identifiers
| Identifier | Can change after reconnect? | Appropriate use |
|---|---|---|
| Bus number | Yes | Current topology and log correlation |
| USB device number | Yes | Short-lived investigation only |
/dev/sdX or /dev/ttyUSB0 | Yes | Immediate command output; do not treat as a permanent identity |
| VID:PID | Usually stable for a product model | Matching a device type; may not distinguish individual units |
| Serial number | Usually stable when supplied by the device | Distinguishing recurring physical units |
| Filesystem UUID | Stable until the filesystem is recreated or changed | Identifying a storage filesystem |
| udev property or persistent path | Designed to remain stable under normal reconnects | Automation and application configuration |
Practical example: identify a newly connected flash drive
- Record the current USB and block-device lists.
- Connect the flash drive directly, if possible.
- Compare the lists and watch the kernel messages.
lsusb > /tmp/usb-before.txt
lsblk -o NAME,MODEL,TRAN,SIZE,FSTYPE,MOUNTPOINTS > /tmp/block-before.txt
sudo journalctl -kfAfter connecting the drive, stop the live journal with Ctrl+C, then run:
lsusb
lsblk -o NAME,MODEL,TRAN,SIZE,FSTYPE,MOUNTPOINTS
sudo blkidMatch the new USB model and VID:PID with the kernel message and then with the new block device. Confirm whether the whole disk is /dev/sdX, which partitions exist, and whether a partition is mounted.
Practical example: check a webcam
First locate the device at the USB level:
lsusb
lsusb -t
sudo journalctl -k --grep='usb|video|uvc'A recognized webcam commonly reports a video class or a webcam driver in the USB tree or kernel journal. Then identify the resulting video node, such as /dev/video0, and inspect its udev properties:
udevadm info --query=all --name=/dev/video0Practical example: find a USB-to-serial adapter
Connect the adapter while following the kernel journal:
sudo journalctl -kfLook for a line assigning a node such as /dev/ttyUSB0 or /dev/ttyACM0. Confirm the node and its permissions:
ls -l /dev/ttyUSB0
udevadm info --query=all --name=/dev/ttyUSB0
udevadm info --attribute-walk --name=/dev/ttyUSB0If the adapter is listed by lsusb but no serial node appears, check whether the expected driver is loaded or whether the kernel reports an incompatible device. Also check whether another application already has the port open.
Troubleshoot an unrecognized USB device
Use this sequence rather than starting with destructive or unrelated commands:
- Check that the connector is fully seated and inspect the cable and port.
- Compare
lsusbandlsblkoutput before and after insertion. - Run
sudo journalctl -kforsudo dmesg -wwhile reconnecting the device. - Inspect
lsusb -tfor the parent hub, port, and negotiated speed. - Try a known-good cable, another host port, and a direct connection instead of a hub or dock.
- Check external power and avoid unpowered hubs for high-demand devices.
- Verify that the required kernel driver or module is available.
- Test the device on another computer when possible to separate host and peripheral faults.
| Symptom or message pattern | Likely cause | Diagnostic step | Potential remedy |
|---|---|---|---|
Device does not appear in lsusb | Bad cable, port, hub, power source, or device hardware | Watch kernel logs and test another cable, port, or computer | Replace the cable, use a direct or powered connection, or replace the device |
| Device descriptor read failure or enumeration failure | Signal integrity, incompatible hardware, or unstable power | Inspect live logs and test a shorter cable or different port | Change cable or port and remove intermediary hubs |
| Repeated connect and disconnect messages | Power instability, cable problem, defective device, or hub compatibility | Check resets and power errors in the journal | Use a powered hub or direct port and test known-good hardware |
| Storage is detected but expected files are absent | Partition is not mounted, layout is unexpected, or filesystem/media is damaged | Run lsblk, blkid, and inspect mount points and logs | Mount the correct partition or investigate filesystem and media errors |
| Serial adapter appears but an application cannot open it | Wrong node, permissions, missing driver, or another process using it | Check kernel assignment, node ownership, udev properties, and processes | Use the correct node, configure access policy, load compatible support, or stop the conflicting application |
| Peripheral operates at reduced speed through a dock | Lower negotiated USB generation, shared bandwidth, weak dock power, or cable limitation | Compare lsusb -t through the dock and directly | Use a suitable port and cable, improve dock power, or reduce hub contention |
Quick reference: Linux USB inspection tools
| Tool | Primary purpose | Typical information shown | Best use case |
|---|---|---|---|
lsusb | List USB-level devices | Bus, device number, VID:PID, vendor, product | Confirm detection and basic identity |
lsusb -t | Display topology | Hubs, ports, parentage, speed, classes, drivers | Diagnose docks, hubs, placement, and bandwidth |
lsusb -v | Show descriptors | Configurations, interfaces, endpoints, class details | Inspect a specific device deeply |
journalctl -k or dmesg | Read kernel events | Enumeration, errors, drivers, assigned nodes | Understand connection and driver failures |
lsblk | Inspect block devices | Disks, partitions, transport, filesystems, mounts | Identify USB storage safely |
blkid | Inspect filesystem identities | UUIDs, labels, filesystem types | Correlate partitions and stable storage identifiers |
udevadm | Inspect device-manager properties | Names, IDs, attributes, parent relationships | Correlate USB parents with functional nodes and automation |
/sys/bus/usb/devices | Read kernel USB attributes | VID, PID, strings, speed, topology-related entries | Query exact low-level attributes |
Summary
Start with lsusb to establish USB-level identity, use lsusb -t to understand the bus and hub path, and follow journalctl -kf while connecting the device. Then use subsystem-specific tools such as lsblk, blkid, and udevadm to find the operating-system representation.
Bus and device numbers are temporary. For recurring identification and automation, prefer VID:PID together with manufacturer, product, serial number, filesystem UUID, or udev properties. For related guidance, see Display Information About USB Devices.