Hi Guys, Welcome back to my new post in this post, I will show you “How do you list the USB devices in Linux?”
Mostly, people are interested in knowing what USB devices are connected to the system. This may help troubleshoot the USB devices.
The question can have two meanings-
- How many USB ports are (detected) on your system?
- How many USB devices/disks are mounted (plugged in) to the system?
- How To Send/Received Files All-Over-World (CLI) without Port Forwarding?
- How to Install Kali Linux on Android without Root – 2022
- How to Stop Website from Opening new Tabs?
- FRP Bypass APK Download for Android 2022 | How to Install FRP Bypass App in Android Device
- How to Avoid Brute Force Attack on Windows server | Some methods to Prevent Brute Force Attack!
- How To Secure Your Personal Data And Files – 2022
The most reliable way is to use this command:
lsusb
It shows the webcam, Bluetooth, and Ethernet ports along with the USB ports and mounted USB drives.
But understanding the output of lsusb is not easy, and you may not need to complicate things when you just want to see and access the mounted USB drives.
I will show you various tools and commands you can use to list USB devices connected to your system.
Let me start with the simplest of the options for desktop users.
Check connected USB devices graphically –
Using the mount command to list the mounted USB devices –
mount | grep media
Using df command-
df -Th | grep media
Using lsblk command-
lsblk | grep media
If you are more curious, you can use the blkid command to know the UUID, Label, Block size etc.
This command gives more output as your internal drives are also listed. So, you have to take references from the above command to identify the device you wish to know about.
sudo blkid
Using fdisk-
sudo fdisk -l
Inspecting /proc/mounts –
cat /proc/mounts | grep media
Display all the USB devices with lsusb command –
lsusb
usb-devices
Greg has also developed a small GTK application called Usbview. This application shows you the list of all the USB devices connected to your computer.
The application is available in the official repositories of most Linux distributions. You can install usbview package using your distribution’s package manager easily.
Once installed, you can launch it from the application menu. You can select any of the listed devices to get details.
LAST WORD:
Most of the methods listed are limited to USB storage devices. There are only two methods which can list other peripherals also; usbview and usbutils. I guess we have one more reason to be grateful to the Linux Kernel developer Greg for developing these handy tools.
I am aware that there are many more ways to list USB devices connected to your system. Your suggestions are welcome.
This is enough for now, we will meet very soon with a new and very interesting article. Thank you so much to read my article post, if you like this and want to get daily updates, I wish you all are always happy and stay tuned with us as always.