The USB Host device driver exposes the connected devices through the file system at /dev/bus/usb/.

Linux identifies USB devices as soon as they are plugged in. Depending on the log level, the serial console may display a message reporting that the USB device has been plugged in. For example, plugging in a USB memory stick displays this message:

sd 1:0:0:0: [sda] 1970176 512-byte logical blocks: (1.00 GB/962 MiB)
platform fixedregulator.25: Driver reg-fixed-voltage requests probe deferral
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 0b 00 00 08
sd 1:0:0:0: [sda] No Caching mode page found
sd 1:0:0:0: [sda] Assuming drive cache: write through
sd 1:0:0:0: [sda] No Caching mode page found
sd 1:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 1:0:0:0: [sda] No Caching mode page found
sd 1:0:0:0: [sda] Assuming drive cache: write through
sd 1:0:0:0: [sda] Attached SCSI removable disk
FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

If no message is displayed on the console, you can view all the system messages by printing the contents of the system log file:

# cat /var/log/messages

To get a list of the connected USB devices on the USB Host port, use the command lsusb:.

# lsusb
Bus 001 Device 004: ID 0781:5530 SanDisk Corp. Cruzer
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

To get more detailed information on the connected USB device, use

# lsusb -D /dev/bus/usb/001/004

where the first numbered folder corresponds to the bus number and the second to the device number.

USB memory sticks

Linux automatically mounts USB memory sticks' partitions as /run/media/sdxN, where x is a letter and N the index of the partition (starting at 1).

If Linux does not automatically mount a partition, you can mount it manually. Use the mount command, passing the corresponding file system type with -t option and the mount point folder; for example, for a FAT32 file system:

# mkdir /media/myusb
# mount -t vfat /dev/sda1 /media/myusb

Other USB input devices

Other USB input devices, such as a mouse or a keyboard, can be used immediately after being connected. For example, connect a keyboard to a USB connector. Then, run the following command to dump the keyboard key events:

# hexdump /dev/input/event0

USB SuperSpeed

The USB3DR port is SuperSpeed capable, but configured by default as USB 2.0. See USB SuperSpeed to learn how to enable SuperSpeed on this port.

Due to a missing implementation in the current UCPD support in Linux, the CC1/CC2 orientation detection is not functional. As a result, USB type-C cables only operate when connected in one specific orientation. If the device is not functional, or not working at the appropriate speed, try turning the cable upside down at the type-C connector.

To achieve SuperSpeed data rates, connect a SuperSpeed-compatible device (not all devices and USB disks are). SuperSpeed devices are usually marked with a blue USB connector. Otherwise, check the specifications of the device.

To verify the data rate of your device, list the USB devices with:

# lsusb -t

SuperSpeed devices show 5000M speed.