Ubuntu – Command to mute and unmute a microphone

alsamicrophonepulseaudiosound

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

Best Answer

Go to

System Preferences then Keyboard and click Shortcuts then Custom Shortcuts:

Click on Add

Fill in:

Toggle microphone

and

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).

Related Question