Pactl - PulseAudio Control Command Line Tool

Control PulseAudio sound devices with pactl commands. Adjust volume, mute/unmute sinks, and manage audio streams from the command line.

Pactl

PulseAudio Command-Line Control

The pactl command-line utility is a powerful tool for interacting with the PulseAudio sound server. It allows users to control various aspects of audio playback and recording directly from the terminal, making it invaluable for scripting, automation, and advanced audio management on Linux systems.

Common Pactl Commands

Here are some frequently used pactl commands for managing your audio output:

Adjusting Volume

You can easily increase or decrease the volume of your default audio output sink. The following examples demonstrate how to modify the volume by a specific percentage:

---
syntax: bash
tags: [ audio, pulseaudio ]
---
# INCREASE the volume of default sink by 2.5%
pactl set-sink-volume @DEFAULT_SINK@ +2.5%

# DECREASE the volume of default sink by 2.5%
pactl set-sink-volume @DEFAULT_SINK@ -2.5%

Toggling Mute

Muting and unmuting your audio output is straightforward with pactl. The toggle option conveniently switches the mute state:

# Toggle mute the default sink
pactl set-sink-mute @DEFAULT_SINK@ toggle

Further PulseAudio Resources

For more in-depth information and advanced usage of PulseAudio and its control tools, consider exploring the following resources: