Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is it possible to set the audio volume using the terminal?, instead of clicking the speaker icon in the topbar, the reason I want need to do this is because my keyboard does not have a volume increase/decrease buttons and I find it annoying to reach for the mouse.

share|improve this question
add comment

3 Answers

up vote 20 down vote accepted

For interactive usage you can use alsamixer. For scripting (e.g. binding to key combinations) take a look at amixer.

alsamixer is included by default in most systems.


To set the master volume use:

# Gets a list of simple mixer controls
$ amixer scontrols 

Then set it to the desired volume, as an example

$ amixer sset 'Master' 50%
share|improve this answer
add comment

Found in Openbox's configuration file rc.xml:

# increase by 3%
amixer -q sset Master 3%+

# decrease by 3%
amixer -q sset Master 3%-

# mute/unmute
amixer -q sset Master toggle

amixer manual page can give more details.

share|improve this answer
add comment

you can also try pamixer, a recent project that does exactly what you want. It is in the ArchLinux AUR repository with the same name.

share|improve this answer
add comment

Your Answer

 
discard

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.