$linuxjunkies
>

pactl(1)

Control the PulseAudio sound server and manage audio devices, sinks, sources, and streams.

UbuntuDebianFedoraArch

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

FlagWhat it does
-s SERVERConnect to a specific PulseAudio server (default: uses PULSE_SERVER environment variable or localhost)
-nDon't connect to the server, only parse and validate commands locally
--format=FORMATSet output format (json, json-pretty, default)
-h, --helpDisplay help message and exit
--versionShow version information and exit

Examples

Display all available audio output devices (sinks) with their properties and index numbers

pactl list sinks

List all available audio input devices (sources) such as microphones

pactl list sources

Set 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-stereo

Toggle mute on/off for sink #0

pactl set-sink-mute 0 toggle

Print the name of the current default audio output device

pactl get-default-sink

Increase 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

Related commands