Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is very odd, i have one default microphone and i have another second microphone. When i use this command it always shows not muted but the microphone volume is 0%. How or what is a way i can find those value accurately.

$ pactl list | sed -n '/^Source/,/^$/p' | grep Mute
    Mute: no
    Mute: no
    Mute: no
share|improve this question
up vote 6 down vote accepted

By using the Pulseaudio Command Line Interface we will obtain a lot of information on available sources

pacmd list-sources

will display a rather lengthy list. The current active input is marked with an asterisk. We could combine this with grep but will then lose information for which source the outputs are valid

pacmd list-sources | grep volume

To set an output to a defined value we need to know it's index which is also given by list-sources to issue

pacmd set-source-volume <index> <value> # value: 0 = mute 65536 = 100%

We may also need to unmute the sink source with

pacmd set-source-mute <index> 0
share|improve this answer

You access this information with amixer. To list all sound controls you can issue the command

$ amixer controls
numid=18,iface=MIXER,name='Capture Source'
numid=19,iface=MIXER,name='Capture Switch'
numid=20,iface=MIXER,name='Capture Volume'

and then read the values of the controls with

$$ amixer cget numid=20
numid=20,iface=MIXER,name='Capture Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=15,step=0
  : values=0,0
  | dBscale-min=0.00dB,step=1.50dB,mute=0

Check out the man pages of amixer. Interesting is also alsamixer, which gives you a more intuitive command line interface.

share|improve this answer

This is a simple solution to toggle/untoggle the microphone mute with one line

I believe this helps

I created a mictoggle online script

$cat /usr/local/bin/mictoggle

pactl list sources | grep -qi 'Mute: yes' && pactl set-source-mute 1 false || pactl set-source-mute 1 true


share|improve this answer
This is not what the OP asked. – guntbert May 30 '15 at 16:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.