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

During voice / video conversations online I would like to mute/unmute the microphone without having to go through all these steps each time:

  • Sound indicator, Sound preferences, Select Input, Mute or unmute the microphone.

I'm looking for either:

  • an application that can do this from the commandline,
  • a way I can assign a keyboard shortcut that can mute/unmute the microphone
share|improve this question
If you use Empathy for voice chat, it has a mute button built-in (that works with Google Talk at least, Skype isn't supported yet). – JanC Nov 8 '10 at 14:56
I'm looking for something that can be made to run through a shortcut, similar to the main volume mute/unmute laptop toggle button. – Lucian Adrian Grijincu Nov 8 '10 at 16:03
up vote 13 down vote accepted

Go to

System Preferences then Keyboard and click Shortcuts then Custom Shortcuts:

Click on Add

Fill in:

Toggle microphone


amixer set Capture toggle

For usb webcams you need to chose device (-c 1), or maybe another number.

amixer -c 1 sset Mic toggle

Click Apply and then associate a new key with this command (e.g. the Pause/Break key).

share|improve this answer
Works this with recent releases? Thank you. – Diego V Apr 9 '13 at 19:23
It does work; thanks to Lucian. I have an "Audio mute" key on my laptop, I mapped it to shift+Audio mute, which is very easy to remember :) – Pierre-Antoine Apr 15 '13 at 15:55
The command amixer set Mic toggle (not Capture) works for me in terminal but any assigned keyboard shortcut doesn't actually seem to run. I've tried ctrl+Audio Mute but also ctrl+M (captured by keyboard key presses) – Jason Kleban Jan 15 '14 at 15:42

pacmd is the command line interface to PulseAudio (the sound subsystem used in recent releases). I don't know what the exact command is you'd need but I think you'd want to play with the set-sink-input-mute function.

pacmd is interactive when run without instructions so you have a good opportunity to play around with it and convert that into a one-line function for toggling mute.

share|improve this answer
pacmd is only interactive if you don't give it any commands. I used pacmd list-sources to get a list of inputs and outputs. Under index 2 I had an input devide. (based on its name) Then you can run pacmd set-source-mute 2 1 to mute. Last parameter is a boolean for mute state. 0 or false for unmute and 1 or true for mute. – Vitaly Jan 26 '15 at 17:54

You can mute the microphone with

amixer set Capture nocap

and unmute the microphone with

amixer set Capture cap
share|improve this answer
that worked great with raspberry pi, except you substitute Mic for Capture – WhiskerBiscuit Apr 24 '14 at 6:41

You can mute with:

/usr/bin/amixer -q -c 0 sset 'Master',0 mute


/usr/bin/amixer -q -c 0 sset 'Master',0 unmute

You just need to replace 'Master' with the appropriate mixer name, on the terminal use "amixer" to get a list of mixer devices.

About setting the keyboard shortcut check the answers for How can I find which command is bound to a given keyboard shortcut?

share|improve this answer
These mute the sound from my speakers, not the microphone, but thanks. – Lucian Adrian Grijincu Nov 8 '10 at 15:29
You just need to replace 'Master' with the appropriate mixer name, on the terminal use "amixer" to get a list of mixer devices. – João Pinto Nov 8 '10 at 15:36
This seems to work: # amixer set Capture toggle – Lucian Adrian Grijincu Nov 8 '10 at 15:53
Can you edit your response (I don't have the necessary karma) to include this answer so I'll accept it? – Lucian Adrian Grijincu Nov 8 '10 at 16:00
amixer set Capture toggle && amixer get Capture | grep '\[off\]' && notify-send "MIC switched OFF" || notify-send "MIC switched ON"
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.