DEV Community

Felippe Regazio
Felippe Regazio

Posted on

An useful alias to toggle your microphone from terminal (Linux)

I'm using Ubuntu, so i suppose this alias will work on every Debian based distro, but i dont have sure. Anyway, here it goes:

The command:

amixer set Capture toggle
Enter fullscreen mode Exit fullscreen mode

If you type it on your bash, you will alternate your microphone on/off switch (toggle). Thats pretty useful if you're working remotely with lots of video/sound channels, for example, you just toggle your mic off and mute all your apps and channels.

Lets turn it into a permanent alias.
For that, open a terminal and type the command below:

 echo "alias mic='amixer set Capture toggle'" >> ~/.bashrc && . ~/.bashrc
Enter fullscreen mode Exit fullscreen mode

Now if you type mic on your terminal it will toggle your microphone and show a status message. So, when you want to mute all apps, or have sure you didnt missed anything, just type mic and turn off your microphone.

Thats all ;)

Latest comments (0)