How to use the command 'amixer' (with examples)
- Linux
- December 25, 2023
The ‘amixer’ command is a mixer for ALSA soundcard driver. It allows users to control the audio levels of various sound devices in a Linux system.
Use case 1: Turn up the master volume by 10%
Code:
amixer -D pulse sset Master 10%+
Motivation:
Increasing the master volume can be useful in situations where the audio output is too low or not audible. By using this command, users can easily adjust the audio levels to their desired level.
Explanation:
- ‘amixer’ is the command used to control the audio levels.
- ‘-D pulse’ specifies the sound card driver to use.
- ‘sset Master’ is used to set the volume level of the master channel.
- ‘10%+’ indicates that the volume should be increased by 10%.
Example output:
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 56036 [86%] [on]
Front Right: Playback 56036 [86%] [on]
Use case 2: Turn down the master volume by 10%
Code:
amixer -D pulse sset Master 10%-
Motivation:
Lowering the master volume can be useful in situations where the audio output is too loud or causing discomfort. By using this command, users can easily decrease the audio levels to a more comfortable level.
Explanation:
- ‘amixer’ is the command used to control the audio levels.
- ‘-D pulse’ specifies the sound card driver to use.
- ‘sset Master’ is used to set the volume level of the master channel.
- ‘10%-’ indicates that the volume should be decreased by 10%.
Example output:
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 50400 [77%] [on]
Front Right: Playback 50400 [77%] [on]
Conclusion:
The ‘amixer’ command is a versatile tool for controlling the audio levels of sound devices in a Linux system. It provides users with the ability to easily adjust the volume levels according to their preferences, whether it be increasing or decreasing the master volume.