How do you list mountable usb devices on linux from terminal?

2
I am using Damn Small Linux and would like to display a list of all connected usb storage devices and their names from terminal for example i would like to be able to figure out what my ipod would be when connected for example /dev/sda1 or whatever. Thanks in advance!

By: ensjesseaccord

About the Author:

Marketing Strategies

Filed under Software by on #

Comments on How do you list mountable usb devices on linux from terminal?

January 7, 2010

joe.attaboy @ 2:27 am #

Marketing Strategies

Just use the “mount” command.

That will show you all file systems currently mounted to the system.

January 9, 2010

Goosie @ 4:25 am #

Marketing Strategies

Actually what you want is probably a combination of “lsusb” and “dmesg | tail”.

- Run lsusb before and after you plug in a USB device – it lists all the detected USB devices on the system. If you get a new device listed after you plugged in, you’re on your way to mounting the device.
- The next step is to run “dmesg | tail”. The dmesg command spits out the kernel log. The tail command will filter it to show the last few lines. You are looking for something like:

sd 15:0:0:0: [sdb] Attached SCSI removable disk
sd 15:0:0:0: Attached scsi generic sg2 type 0
usb-storage: device scan complete

As you can see in the example above, I attached a removeable disk which was assigned to sdb (of course yours might be sda, sdc, etc).

With a combination of the 2 commands above, and possibly doing a “ls /dev | grep ” you can find what devices you have available to mount. The reason you might want to do the ls is for devices with more than one partition.

Login