-   Linux - Newbie (
-   -   finding USB device /dev/sd? (

poly_s 11-08-2011 11:39 AM

finding USB device /dev/sd?

Well I'm trying to find a command line way of finding out which sd? my USB stick is.

It auto mounts fine but I can't find out which /dev/sd? it is.

So I guess I need a command to list them all and identify them some how.

I've been looking on wiki's, google, forums etc but im going round and round in circles.

Please put me out my missery.

Thanks in advance for your time

Passmossis 11-08-2011 11:48 AM

What I typically do is


tail -f /var/log/messages
Now plug in your usb device and you should see where the system mounts it from. I use this when the USB does not auto-mount, but will work either way.

thesnow 11-08-2011 11:48 AM

Try the 'mount' command

suicidaleggroll 11-08-2011 11:57 AM

I usually look at "/var/log/messages" or "fdisk -l" to differentiate between them.

floppy_stuttgart 11-08-2011 01:06 PM

make in a terminal "dmesg > dmesg_ini.txt"
put the usb in your pc
make in a terminal "dmesg > dmesg_end.txt"
The difference between the files ..ini and ..end give your usb name!
And: you can label it (give a name like "love_usb"...;-)

poly_s 11-08-2011 02:08 PM

Brilliant Thanks everyone!

I found "thesnows" method of just typing

the fastest but I found I learnt quite a bit from using "floppy_stuggart's" method.


tail -f /var/log/messages
Didn't work, when I looked at the /var/log/ directory I found logs that list the times that things were done, like plugging in my usb, etc.

Thanks again.
I learnt loads

floppy_stuttgart 11-08-2011 02:24 PM

After you have your usb in your pc, start the programm "gparted" and give the label name "flopp_stgt"....;-)

poly_s 11-08-2011 02:32 PM

I haven't installed Gparted. I was thinking of making a rescue USB with Gparted on though so I can keep it handy to fix problems (and mates machines that die running w!ndow$) ;)

All times are GMT -5. The time now is 06:06 PM.