I couldn’t find the silly volume control in the system settings one day so I figured there had to be something I could use to control volume settings like mic boost without needing a GUI or remembering names and numbers for the CLI. well there is and it’s so easy a caveman could do it (hah remember those ads….)…. so without further ado here’s a fun and great way to control your volume via Alsa CLI Volume control.
type the following then use your arrows to move right/left and make the volume higher or lower by using the up/down keys:
alsamixer -c 0the 0 at the end is the number of your device. if a system only has one device you will use 0. if you have two devices you can use 0 or 1. it tells you the name of the device currently being edited so you don’t give yourself a heart attack by changing the wrong volume. picture of the control is attached.
When alsamixer isn’t enough — amixer for scripts
alsamixer is great for interactive fiddling, but the moment you want to bind a volume key, drop into a script, or just not launch a TUI when you’re in a hurry, you reach for amixer. It’s the non-interactive sibling — same ALSA backend, no curses UI.
Set master volume to 75%:
amixer -c 0 sset Master 75%Bump it up or down in increments (super useful for keybindings):
amixer -c 0 sset Master 5%+amixer -c 0 sset Master 5%-Toggle mute without touching the volume level:
amixer -c 0 sset Master toggleFor mic boost specifically — the thing that made this whole post happen — you swap Master for Mic Boost or Capture depending on your card:
amixer -c 0 sset ‘Mic Boost’ 1amixer -c 0 sset Capture 80%The single quotes matter when the control name has a space. Ask me how I know.
Finding the right control name
If Master or Mic Boost isn’t working, it’s probably named something subtly different on your hardware. List everything ALSA exposes on card 0:
amixer -c 0 scontrolsYou’ll get output like:
Simple mixer control ‘Master’,0Simple mixer control ‘Headphone’,0Simple mixer control ‘Speaker’,0Simple mixer control ‘PCM’,0Simple mixer control ‘Mic Boost’,0Simple mixer control ‘Capture’,0Copy the name exactly (including case) from that list into your sset command. It’s finicky — master won’t work if ALSA registered it as Master.
The card number gotcha
Multiple sound cards trip people up constantly. USB headsets, HDMI audio from a GPU, a dedicated DAC — these all register as separate cards. alsamixer -c 0 might be your motherboard’s on-board audio while your USB headset is on card 1 or 2.
Check what you’ve actually got:
cat /proc/asound/cardsOutput will look something like:
0 [PCH ]: HDA-Intel - HDA Intel PCH HDA Intel PCH at 0xdf240000 irq 130 1 [Headset ]: USB-Audio - Plantronics Headset Plantronics Plantronics Headset at usb-..., full speedNow you know card 1 is the headset. Adjust accordingly:
amixer -c 1 sset Master 80%Throw it in a script already
If you’re binding these to keyboard shortcuts in i3, sway, xbindkeys, or whatever tiling WM rabbit hole you’re currently in, a tiny wrapper makes life easier:
#!/usr/bin/env bashCARD=${CARD:-0}case "$1" in up) amixer -q -c "$CARD" sset Master 5%+ ;; down) amixer -q -c "$CARD" sset Master 5%- ;; mute) amixer -q -c "$CARD" sset Master toggle ;; *) echo "Usage: $0 up|down|mute" ;;esacThe -q flag suppresses amixer’s chatty output — you don’t need a wall of text every time you tap the volume key. Drop the script somewhere on your PATH, chmod +x it, and point your keybindings at vol.sh up, vol.sh down, and vol.sh mute.
Set CARD=1 in your environment if your default device isn’t card 0 and you don’t want to hardcode it.
Persisting volume settings across reboots
Here’s a fun one: you dial in your volume perfectly, reboot, and ALSA has either forgotten everything or reset to some default that’s either ear-splitting or completely silent. This happens because ALSA doesn’t automatically save state — you have to tell it to.
Most distros ship alsa-utils, which includes alsactl. Save your current mixer state like this:
sudo alsactl storeThat writes everything to /var/lib/alsa/asound.state. On boot, the alsa-restore systemd service (or an equivalent init script) reads it back. If your distro didn’t set that up automatically, you can wire it yourself:
# check if the restore service existssystemctl status alsa-restoreIf it’s missing or masked, you can restore state manually at login by dropping this in your shell profile:
# Restore ALSA mixer state on login (only if alsactl is available)command -v alsactl &>/dev/null && alsactl restore 2>/dev/null || trueThe 2>/dev/null swallows the error if the state file doesn’t exist yet — handy on a fresh install before you’ve run alsactl store for the first time.
One more gotcha: if you’re using PulseAudio or PipeWire on top of ALSA (which is most modern desktops), those layers manage their own volume state separately. alsactl store only covers the raw ALSA layer. If your volume resets through PulseAudio, that’s a different rabbit hole — but for pure ALSA setups or servers without a sound daemon, this is the fix.