Table of Contents
Today, in this article, we show how to List USB Devices Connected to Linux System. USB is one of the most used types of external interface (Universal Serial Bus). Many external devices, including keyboards, mice, printers, flash drives, etc., use it as their preferred interface. Devices that you plug into a USB port on your computer should automatically turn on when the system boots up because most Linux distributions come with USB drivers installed.
Any device that has a built-in USB interface and the ability to store data in flash memory is called a Universal Serial Bus (USB). Other names for a USB drive include USB key, USB stick, USB flash drive, and more. Most USB drives weigh less than 35 grams and are quite small in size. A specific symbol appears around the connector and port to indicate a USB connection. Webcams, printers, digital cameras, external hard drives, mice, keyboards and scanners are some examples of devices that can be connected using a USB connection.
Most USB devices are simply plugged into a computer without having to restart. One of the most popular and widely used “Plug and Play” gadgets around the world is the USB flash drive. PC OS detects the drives needed to display the material and data saved on the drive once the device is connected to a computer. USB cables have both type A and type b connectors, unlike Ethernet and HDMI cables. Most electronic equipment supports USB devices, which are often used. We have mentioned below the steps to list the USB devices connected to the Linux system.
Steps to List USB Devices Connected to Linux System
List USB device names using df command
Step 1: The df command is a useful command that can help you list all mounted volumes, including your USB drives.
Step 2: When a USB device is connected to a Linux system, especially for Desktop, it is automatically mounted on the /media partition and ready to use.
df -Th | grep media
List USB device name using lsblk command
Step 1: The Lsblk command is used to list all block devices on a Linux system. In the list, you can filter USB devices using the grep command. For example:
lsblk | grep sd
Step 2: To retrieve additional information such as UUID, manufacturer and file system type, use the blkid command as shown.
sudo blkid
List USB device names using fdisk command
Step 1: You can use the good old fdisk command which is used to partition volumes to list all partitions on Linux system including USB drives.
sudo fdisk -l
List USB device details using lsusb command
Step 1: The lsusb command, also known as the “List USB” command, is used in Linux to list all USB devices connected to the system.
lsusb
Step 2: The lsusb command simply lists the connected devices and does not provide more information about the usb devices.
Step 3: For more information about connected USB devices, use the dmesg command. The dmesg command also known as “driver message” or “display message” is used to examine boot messages. Also, it is used to debug hardware-related issues and print messages generated by device drivers. You can use dmesg and grep command to restrict USB devices.
dmesg | grep usb
Step 4: Also, you can pipe the dmesg command to less to make scrolling easier.
dmesg | any less
Step 5: you can search for a specific string by pressing the slash ( / ) key on the keyboard followed by the USB device’s device name or ID.
List USB Devices and Controllers Using USB Devices
Step 1: The usb-devices command is a shell script that allows you to list all USB controllers and USB devices connected to your PC. It prints USB device details such as manufacturer, product name, serial number and more. Here is the output of the command:
usb devices
Final Words
We hope you like our article about how to List USB devices connected to the Linux system. Almost everyone uses some type of USB device on their computer in the field of USB computer accessories. There are USB webcams, USB hard drives, thumb drives (also known as PenDrives) and much more available today. A USB version of almost every device is available. So if you use Linux, you may need to list the USB devices that are connected to your computer at some point.