Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have several USB ports on the front of my computer, and when I insert a thumb drive into one of them, it gets mounted temporarily in /media. I can navigate to its mount point directory in /media and treat it like any other directory, but for what I am trying to do, I need the thumb drive's /dev/___ name. How can I obtain this?

share|improve this question
up vote 2 down vote accepted

If its mounted to /media, the easiest trick is to just say

df /media/path

it will give you the /dev fs its mounted on

For more details you could do, (saving output to a file)

sudo lshw

and, look for the "/media/path" section in the output.
That will give you the association with more details.

share|improve this answer
Thanks, I knew there had to be some kind of command, but my Googlefu wasn't good enough to find it. df works perfectly. – bill Sep 25 '09 at 4:54
I did an inverted lookup :-) recalling I always saw that detail when using df. – nik Sep 25 '09 at 4:56
If it isn't mounted to media, then "fdisk -l | grep sd" will show the essentials, without scrolling off the screen if you have a lot of drives connected. – Andy Lee Robinson Oct 4 '11 at 17:45

lsusb will do the trick.

share|improve this answer

You must log in to answer this question.