Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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 frequently switch between two sound settings: One directly connecting an analog headphone to the computer, and another is I connect an audio device to the HDMI audio output on the monitor. I want to switch between them quickly by writing a short script to switch between the two settings. How can I do this?

share|improve this question

I think you should be looking at something like this:

alsactl save CARD # to save the configuration
alsactl restore CARD # to restore the configuration

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.