PulseAudio command line control with pulseaudio-ctl
January 2, 2016
I’ve long controlled the sound volume with keybindings in Openbox, but now that PulseAudio has become default, I keep forgetting how to do so with this new sound server. You’ll find a variety of suggestions on how to control PulseAudio from the command line online, but most of them don’t work for me.
I’ve found this to be the easiest way to control PulseAudio from the command line, using pulseaudio-ctl.
The default of the “up” and “down” commands is 5%. You can specify a different percentage. For example, if you want to increase the volume by 10%, use the following command:
/usr/bin/pulseaudio-ctl up 10
You can also set the volume at a certain percentage. If you want to set the volume at 50%, use the following command:
/usr/bin/pulseaudio-ctl set 50
Or you can set the volume at 50%, if it is currently higher than that with this command:
/usr/bin/pulseaudio-ctl atmost 50
For more options, read pulseaudio-ctl’s documentation.