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

Felippe Regazio @felipperegazio

About: software engineer, frontend specialist, curious generalist, platform dx, open sourcerer, father. a strange carbon-based lifeform

Location:
Brazil
Joined:
Feb 27, 2018

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

Publish Date: Mar 18 '20
14 0

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

Comments 0 total

    Add comment