← 返回命令列表

Linux command

pamixer 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Get current volume

pamixer --get-volume

Set volume

pamixer --set-volume [50]

Increase volume

pamixer -i [5]

Decrease volume

pamixer -d [5]

Mute audio

pamixer -m

Unmute audio

pamixer -u

Toggle mute

pamixer -t

Set volume for specific sink

pamixer --sink [1] --set-volume [50]

说明

pamixer controls PulseAudio and PipeWire volume from the command line. It provides simple volume management for scripting and keybindings. Volume operations work as percentages. Increase and decrease adjust relative to current level. Set-volume applies an absolute percentage. Mute control toggles audio without changing volume level. The toggle command provides single-key mute/unmute functionality. Sink selection targets specific audio outputs when multiple exist. Default sink is used when not specified. Sources control microphone and input levels. Allow-boost permits volume above 100%, useful for quiet audio sources. This may cause distortion with already-loud content. The tool works with both PulseAudio and PipeWire (through its PulseAudio compatibility layer).

参数

--get-volume
Print current volume.
--set-volume _N_
Set volume percentage.
-i _N_, --increase _N_
Increase volume by N%.
-d _N_, --decrease _N_
Decrease volume by N%.
-m, --mute
Mute.
-u, --unmute
Unmute.
-t, --toggle-mute
Toggle mute state.
--get-mute
Print mute status.
--sink _ID_
Select sink (output).
--source _ID_
Select source (input).
--default-source
Use default source.
--list-sinks
List available sinks.
--list-sources
List available sources.
--allow-boost
Allow volume above 100%.

FAQ

What is the pamixer command used for?

pamixer controls PulseAudio and PipeWire volume from the command line. It provides simple volume management for scripting and keybindings. Volume operations work as percentages. Increase and decrease adjust relative to current level. Set-volume applies an absolute percentage. Mute control toggles audio without changing volume level. The toggle command provides single-key mute/unmute functionality. Sink selection targets specific audio outputs when multiple exist. Default sink is used when not specified. Sources control microphone and input levels. Allow-boost permits volume above 100%, useful for quiet audio sources. This may cause distortion with already-loud content. The tool works with both PulseAudio and PipeWire (through its PulseAudio compatibility layer).

How do I run a basic pamixer example?

Run `pamixer --get-volume` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --get-volume do in pamixer?

Print current volume.