0

Imagine you have two identical USB-stick connected to your server.
You are connected with ssh.
When you type lsusb you can see the two USB drives.

My question is:
If you want mount this stick

"Bus 001 Device 004: ID 0951:1624 Kingston Technology DataTraveler G2 4GB Pen Drive"

how can you know if this USB-stick is sda or sdb etc...

OR more precisely what command should I use to identify the correct USB (hardware)

  • Look in /dev/disk/by-id if you are running Debian. – LawrenceC Apr 6 '15 at 16:36
0

If you know the order the sticks were plugged in you could use dmesg to see which USB device was mapped to /dev/sd*, they should show up there in the same order they were plugged in.

Also, if you could try udevadm info -q path -n /dev/sdb and iterate over the possible devices to see which has the USB connection info matching the stick you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.