DEV Community

loading...

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

Felippe Regazio
web developer - js, [s]css, node, php, python - intp, lifelong learner, father, skateboarder. a strange carbon-based lifeform.
・1 min read

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

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

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

Discussion (0)