How do you mute the sound system from the command line?
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.
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:
In my setup sometimes amixer unmute fails for some reason. Therefore I'm using pactl in my scripts:
pactl set-sink-mute 0 1
pactl set-sink-mute 0 0
Tested on Ubuntu 12.10.
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.