Adjust Volume in Linux with Alsamixer
Set volume on the commandline in Linux. Dreams fulfilled.
Is this your tool?
First, do you have Alsamixer? It depends on your audio drivers. See those drivers with:
You'll see lots of stuff like:
Name: alsa_output.pci-0000_00_1f.3.analog-stereo Description: Built-in Audio Analog Stereo
Or just try by typing
amixer and get:
Simple mixer control 'Master',0 Capabilities: pvolume pswitch pswitch-joined Playback channels: Front Left - Front Right Limits: Playback 0 - 65536 Mono: Front Left: Playback 19661 [30%] [on] Front Right: Playback 19661 [30%] [on] Simple mixer control 'Capture',0 Capabilities: cvolume cswitch cswitch-joined Capture channels: Front Left - Front Right Limits: Capture 0 - 65536 Front Left: Capture 65536 [100%] [on] Front Right: Capture 65536 [100%] [on]
"Master" control. Time to drop a beat...
amixer will let you run commands to adjust the volume.
-D identifies the device.
"pulse" works for me. I found it in another example. Why is that the proper value? Help me, Obee-doob Badoobi.
Well here are the helpful commands:
amixer -D pulse sset Master mute
amixer -D pulse sset Master unmute
amixer -D pulse sset Master 0% # lowest amixer -D pulse sset Master 100% # highest
amixer -D pulse sset Master 5%+
amixer -D pulse sset Master 5%-