I need to set the system volume in a bash script, but I have no idea how to do this.
Should I use alsactl
? Are there some values in /proc
or /sys
that I could use?
You should use the amixer tool.
Run amixer
without parameters to get a list of mixer controls.
Use commands like this:
amixer set Master 50% # set absolute
amixer set Master 2dB+ # set relative
amixer set Master unmute