How to list USB Devices Connected to Linux System

  • How many USB ports are (detected) on your system?
  • How many USB devices/disks are mounted (plugged in) to the system?

Check connected USB devices graphically -

STEP:1 Your distribution file manager can be used to view USB storage devices connected to your computer.

Using the mount command to list the mounted USB devices -

STEP:1 The mount command is used for mounting partitions in Linux. You can also list USB storage devices using the same command.

Using df command-

STEP:1 df command is a standard UNIX command used to know the amount of available disk space. You can also use this command to list USB storage devices connected using the command below.

Using lsblk command-

STEP:1 The lsblk command is used to list block devices in the terminal. So, here also by filtering the output containing media keyword, you can get the desired result.

Using fdisk-

fdisk, the good old command line partition manager, can also list the USB storage devices connected to your computer. The output of this command is also very long. So, usually, the connected devices get listed at the bottom as shown below.

Inspecting /proc/mounts -

By inspecting the /proc/mounts file, you can list the USB Storage devices. As you can notice, it shows you the mount options being used by the filesystem along with the mount point.

Display all the USB devices with lsusb command -

Linux kernel developer Greg Kroah-Hartman developed this handy usbutils utility. This provides us with two commands i.e. lsusb and usb-devices to list USB devices in Linux.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store