Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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'm looking for a way to select sound card in Lubuntu 12.04 without installing any additional packages like xfce4-mixer (with all of its dependencies). Is there a way to interactively select a sound card with alsa?

share|improve this question
up vote 3 down vote accepted

There is no way to switch the audio output on the fly from one sound card to another with ALSA. To define my NuForce sound card as the one to use I created the file ~/.asoundrc with the content

pcm.!default {
    type hw
    card N2

ctl.!default {
    type hw
    card N2

where the name N2 comes from the content of the file /proc/asound/cards:

$ cat /proc/asound/cards
 0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0x93480000 irq 23
 1 [B10            ]: USB-Audio - Benchmark 1.0
                      Texas Instruments Benchmark 1.0 at usb-0000:00:04.0-1, full speed
 2 [N2             ]: USB-Audio - NuForce µDAC 2
                      NuForce NuForce µDAC 2 at usb-0000:00:04.0-3, full speed

If I want to change to B10 say, I need to edit ~/.asoundrc and restart the sound application.

share|improve this answer

In a terminal:


Press s to select a sound card. Esc exits

share|improve this answer
OK, I thought the s command only displayed the controls for another sound card rather than selecting it for output. I'll try it when I'm at the computer in question. – August Karlstrom Jul 24 '12 at 9:45
Unfortunately it doesn't seem to work. After selecting my USB sound card (named N2) and running aplay test.wav the internal sound card is still being used whereas running aplay -Dhw:N2 test.wav uses my USB sound card. – August Karlstrom Jul 25 '12 at 17:18
For the purpose of trouble shooting, is there a command which displays the currently selected sound card? – August Karlstrom Jul 27 '12 at 7:58
pacmd probably does that. Never acually used it for that though, so I don't know the exact command. Try this: pacmd help. I use pacmd to set my volume to max in the morning and play music to wake me up: pacmd set-sink-volume 0 55535 – Grimtech Jul 27 '12 at 17:01
Thanks for the tip but I'm using Lubuntu which has no PulseAudio daemon running. – August Karlstrom Jul 27 '12 at 17:50

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.