Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 a microphone that I connected via USB. When I do dmesg it shows

[37830.040274] usb 5-1: new full speed USB device using uhci_hcd and address 4

How do I find out what /dev/??? identifier has been associated with the device? I want to record something using XVidCap and need to set the microphone for it to work.

PS: I'm on Ubuntu 11.04

share|improve this question

migrated from Jul 11 '11 at 18:25

This question came from our site for professional and enthusiast programmers.

Please migrate to – 9000 Jul 11 '11 at 18:09
up vote 2 down vote accepted

You can always output ls /dev > devs.txt then connect your device, do it again ls /dev > devs2.txt then run a diff devs.txt devs2.txt and see what shows up.

share|improve this answer
Hmm.. I really like the idea. Very smart. Unfortunately they seem to be identical. – Frank Vilea Jul 11 '11 at 18:11
try find /dev instead - there are subdirectories. USB is in a subdirectory on one of the machines i use. – Tom Anderson Jul 11 '11 at 21:46

Could be worth poking around in /sys/bus/usb/devices/5-1/, but i can't immediately find a way to get from there to the name in /dev.

share|improve this answer

It is usually set up as /dev/dsp1 what do you see in yours? Also see if lsusb --verbose | less yields you any useful output. More detailed output may be present in /var/log/messages when you attached the USB device and your computer identified it.

share|improve this answer
That's an old OSS name and isn't relevant on a modern system with ALSA sound. – TomH Jul 11 '11 at 19:33

As Tom Anderson already mentioned, the information is available in /sys. There's /sys/bus/usb/devices//product /sys/bus/usb/devices//manufacturer

share|improve this answer
Thanks Andreas, I see the device in /sys/bus/usb/devices/5-1. Where can I obtain the /dev/ identifier from there? There is a file dev that has the number 189:516. Does this somehow help? – Frank Vilea Jul 11 '11 at 18:39

If linux has recognised it and is able to handle it then any devices would be under /dev/snd but you don't really want to be accessing the device directly on an ALSA based system.

Instead you should use the ALSA libaries and/or command line tools to access the device.

share|improve this answer


Sample Output:

sda      8:0    1   7.3G  0 disk
ââsda1   8:1    1   243M  0 part
ââsda2   8:2    1     1K  0 part
ââsda5   8:5    1     7G  0 part /
sdd      8:48   0   1.8T  0 disk
ââsdd1   8:49   0   1.8T  0 part
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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