Skip to main content
3 of 3
added 197 characters in body
Dmitry Grigoryev
  • 28.2k
  • 6
  • 54
  • 145

Try amixer:

amixer sset 'Capture' cap
amixer sset 'Capture' nocap

You may have to find out the control name for the microphone in your setup if you use additional hardware. amixer scontrols will list the controls you have.

There's also pactl command which should work on PulseAudio level. Identify the mic in the output of pactl list sources and then mute / unmute the source by number

pactl set-source-mute 0 1 # mute source 0
pactl set-source-mute 0 0 # unmute source 0
Dmitry Grigoryev
  • 28.2k
  • 6
  • 54
  • 145