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

How do you mute the sound system from the command line?

share|improve this question
Works perfectly with the i3 window manager. Thanks a lot! – user315729 Aug 14 '14 at 18:42
up vote 49 down vote accepted

Assuming you're using ALSA driver, run:

amixer set Master mute   
amixer set Master unmute

Or, you can just use:

amixer set Master toggle

to toggle mute on and off.

share|improve this answer
for me / my system (precise), this only goes one way: off / mute. Neither toggle nor unmute bring the music back on. Any ideas as to why?? – nutty about natty May 8 '12 at 13:12
This solution is for pure Alsa. For Alsa with pulseaudio, use the command from Tim's answer. Or don't touch the command and instead configure Alsa as in this answer. Else, @nutty about natty's problem of not being able to unmute results. – tanius Feb 17 at 1:32

This worked for me when others didn't:

amixer -q -D pulse sset Master toggle

This is from the link in nutty about natty's comment to the first answer:

share|improve this answer
Thanks! This works for me on Ubuntu 12.04. – Kamil Slowikowski May 30 '14 at 2:53
I also just checked, it works on 14.04 too. – Tim May 30 '14 at 8:59
did it :) - kubuntu here (Ubuntu 14.04.2 LTS). thx. – hakre Jul 2 '15 at 18:28
This -D pulse option is needed when Alsa is used with pulseaudio (and since the question is tagged pulseaudio, this should be the accepted answer). For more details about this solution, see here and here on askubuntu. – tanius Feb 17 at 1:23
Note: The accepted answer by @goric doesn't work when headphones or earphones are plugged in, use this. – Bharadwaj Raju May 27 at 12:34

On the terminal type this to mute

amixer set Master mute


amixer set Master unmute

Tested on my Ubuntu 10.10.

PS: +1 for interesting question.

share|improve this answer

In my setup sometimes amixer unmute fails for some reason. Therefore I'm using pactl in my scripts:

to mute:

pactl set-sink-mute 0 1

and unmute:

pactl set-sink-mute 0 0

Tested on Ubuntu 12.10.

share|improve this answer
Still works in Ubuntu 15.10. – tanius Feb 17 at 0:38

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.