Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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! –  nauer Aug 14 at 18:42

4 Answers 4

up vote 38 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
3  
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 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 at 2:53
    
I also just checked, it works on 14.04 too. –  Tim May 30 at 8:59

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

On the terminal type this to mute

amixer set Master mute

type

amixer set Master unmute

Tested on my Ubuntu 10.10.

PS: +1 for interesting question.

share|improve this answer

Your Answer

 
discard

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.