pactl(1)
Control the PulseAudio sound server and manage audio devices, sinks, sources, and streams.
Synopsis
pactl [OPTION]... COMMAND [ARG]...Description
pactl is a command-line tool for controlling PulseAudio, a sound server that manages audio input and output on Linux systems. It allows you to query and modify audio devices, adjust volume levels, switch between outputs, and manage audio streams without using a graphical interface.
Common tasks include listing available audio devices, changing the default sink or source, adjusting volume and mute settings, and monitoring active audio streams. pactl is essential for scripting audio configuration and automation.
Common options
| Flag | What it does |
|---|---|
-s SERVER | Connect to a specific PulseAudio server (default: uses PULSE_SERVER environment variable or localhost) |
-n | Don't connect to the server, only parse and validate commands locally |
--format=FORMAT | Set output format (json, json-pretty, default) |
-h, --help | Display help message and exit |
--version | Show version information and exit |
Examples
Display all available audio output devices (sinks) with their properties and index numbers
pactl list sinksList all available audio input devices (sources) such as microphones
pactl list sourcesSet the volume of sink #0 to 50 percent
pactl set-sink-volume 0 50%Set a specific audio device as the default output sink by its name
pactl set-default-sink alsa_output.pci-0000_00_1f.3.analog-stereoToggle mute on/off for sink #0
pactl set-sink-mute 0 togglePrint the name of the current default audio output device
pactl get-default-sinkIncrease the volume of source #1 by 10 percentage points
pactl set-source-volume 1 +10%Display a compact list of all sinks with minimal formatting, useful for scripting
pactl list short sinks