pactl(1)

๐Ÿ“ฆ
version 17.0+r134+g77d25a1e6 ยท 4 versions
, in alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

โœจ NAME โœจ

pactl โ€” the little remote control for a running PulseAudio sound server ๐ŸŽ›๏ธ๐Ÿ’–

(Also hi, this is the pactl(1) page from the General Commands Manual, and yes we are gonna get through all of it together, bestie.)


๐ŸŒธ SYNOPSIS ๐ŸŒธ

pactl [options] COMMAND [ARGS ...]

pactl --help

pactl --version

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

Okay so real talk: pactl is how you slide into your PulseAudio sound server's DMs and tell it what to do. It issues control commands to it. That's the whole vibe. ๐Ÿ’…

But here's the tea โ€” pactl only exposes a subset of everything the server can actually do. It's giving "curated menu, not the whole kitchen." If you want the full set of operations, you go use pacmd(1). No cap.


๐ŸŽ€ OPTIONS ๐ŸŽ€

  • -h | --help โ€” show the help. Your bestie when you're lost. ๐Ÿซถ
  • --version โ€” show version information. Slay, now you know what you're running. โญ
  • -s | --server=SERVER โ€” pick which server you're connecting to.
  • -f | --format=FORMAT โ€” choose your output format, and the available options are "text" or "json". Pick your aesthetic. โœจ
  • -n | --client-name=NAME โ€” specify the client name that pactl is gonna pass along to the server when it connects. Like an intro card. ๐Ÿชช

๐Ÿ‘‘ COMMANDS ๐Ÿ‘‘

Before we get into it: when you supply these as arguments to the commands below, there are three special names you can use โ€” @DEFAULT_SINK@, @DEFAULT_SOURCE@ and @DEFAULT_MONITOR@ โ€” which let you point at the default sink, the default source, and the default monitor respectively. Main character shortcuts, honestly. ๐Ÿ’–

  • stat โ€” dump a few statistics about the memory usage of the PulseAudio daemon.
  • info โ€” dump some info about the PulseAudio daemon.
  • list [short] [TYPE] โ€” dump all the currently loaded modules, available sinks, sources, streams, etc. TYPE has to be one of: modules, sinks, sources, sink-inputs, source-outputs, clients, samples, cards, message-handlers. If you don't specify one, all the info gets listed โ€” except the message-handlers, they're excluded. And if short is given, the output comes out in a tabular format, which is perfect for easy parsing by scripts. ๐Ÿ”ฅ
  • exit โ€” asks the PulseAudio server to terminate. It's giving "you can go now, thank u next." ๐Ÿ’€
  • upload-sample FILENAME [NAME] โ€” upload a sound from the audio file you specify into the sample cache. The file types supported are the ones understood by libsndfile. The sample in the cache gets named after the audio file, unless you explicitly specify the name. ๐Ÿ“
  • play-sample NAME [SINK] โ€” play the specified sample from the sample cache. It plays on the default sink unless you specify the symbolic name or the numerical index of the sink you want it played on.
  • remove-sample NAME โ€” remove the specified sample from the sample cache. Bye bestie. ๐Ÿ™ˆ
  • load-module NAME [ARGUMENTS ...] โ€” load the specified module, with the specified arguments, into the running sound server. It prints the numeric index of the module that was just loaded to STDOUT, and you can use that to unload the module later. Save that number, iykyk. ๐Ÿงš
  • unload-module ID|NAME โ€” unload the module instance identified by the specified numeric index, or unload all modules by the specified name.
  • move-sink-input ID SINK โ€” move the specified playback stream (identified by its numerical index) over to the specified sink (identified by its symbolic name or numerical index).
  • move-source-output ID SOURCE โ€” move the specified recording stream (identified by its numerical index) over to the specified source (identified by its symbolic name or numerical index).
  • suspend-sink SINK true|false โ€” suspend or resume the specified sink (which you can specify either by its symbolic name or its numerical index), depending on whether true (suspend) or false (resume) is passed as the last argument. Suspending a sink will pause all playback. Depending on the module implementing the sink, this might have the effect that the underlying device is closed โ€” which makes it available for other applications to use. The exact behaviour depends on the module, so don't @ me. ๐Ÿ˜ญ
  • suspend-source SOURCE true|false โ€” suspend or resume the specified source (which you can specify either by its symbolic name or its numerical index), depending on whether true (suspend) or false (resume) is passed as the last argument. Suspending a source will pause all capturing. Depending on the module implementing the source, this might have the effect that the underlying device is closed โ€” making it available for other applications to use. The exact behaviour depends on the module.
  • set-card-profile CARD PROFILE โ€” set the specified card (identified by its symbolic name or numerical index) to the specified profile (identified by its symbolic name).
  • get-default-sink โ€” returns the symbolic name of the default sink.
  • set-default-sink SINK โ€” make the specified sink (identified by its symbolic name or numerical index) the default sink. Use the special name @NONE@ to unset the user defined default sink โ€” this will make pulseaudio return to the default sink selection based on sink priority.
  • set-sink-port SINK PORT โ€” set the specified sink (identified by its symbolic name or numerical index) to the specified port (identified by its symbolic name).
  • get-default-source โ€” returns the symbolic name of the default source.
  • set-default-source SOURCE โ€” make the specified source (identified by its symbolic name or numerical index) the default source. Use the special name @NONE@ to unset the user defined default source โ€” this will make pulseaudio return to the default source selection based on source priority.
  • set-source-port SOURCE PORT โ€” set the specified source (identified by its symbolic name or numerical index) to the specified port (identified by its symbolic name).
  • set-port-latency-offset CARD PORT OFFSET โ€” set a latency offset on a specified port (identified by its symbolic name) that belongs to a card (identified by its symbolic name or numerical index). OFFSET is a number which represents the latency offset in microseconds.
  • get-sink-volume SINK โ€” get the volume of the specified sink (identified by its symbolic name or numerical index), displayed in the same format as the info command.
  • set-sink-volume SINK VOLUME [VOLUME ...] โ€” set the volume of the specified sink (identified by its symbolic name or numerical index). VOLUME can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a decibel value (e.g. 0dB, 20dB). If the volume specification starts with a + or -, the volume adjustment will be relative to the current sink volume. A single volume value affects all channels; if multiple volume values are given, their number has to match the sink's number of channels. โš–๏ธ
  • get-source-volume SOURCE โ€” get the volume of the specified source (identified by its symbolic name or numerical index), displayed in the same format as the info command.
  • set-source-volume SOURCE VOLUME [VOLUME ...] โ€” set the volume of the specified source (identified by its symbolic name or numerical index). VOLUME can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a decibel value (e.g. 0dB, 20dB). If the volume specification starts with a + or -, the volume adjustment will be relative to the current source volume. A single volume value affects all channels; if multiple volume values are given, their number has to match the source's number of channels.
  • set-sink-input-volume INPUT VOLUME [VOLUME ...] โ€” set the volume of the specified sink input (identified by its numerical index). VOLUME can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a decibel value (e.g. 0dB, 20dB). If the volume specification starts with a + or -, the volume adjustment will be relative to the current sink input volume. A single volume value affects all channels; if multiple volume values are given, their number has to match the sink input's number of channels.
  • set-source-output-volume OUTPUT VOLUME [VOLUME ...] โ€” set the volume of the specified source output (identified by its numerical index). VOLUME can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a decibel value (e.g. 0dB, 20dB). If the volume specification starts with a + or -, the volume adjustment will be relative to the current source output volume. A single volume value affects all channels; if multiple volume values are given, their number has to match the source output's number of channels.
  • get-sink-mute SINK โ€” get the mute status of the specified sink (identified by its symbolic name or numerical index).
  • set-sink-mute SINK 1|0|toggle โ€” set the mute status of the specified sink (identified by its symbolic name or numerical index).
  • get-source-mute SOURCE โ€” get the mute status of the specified source (identified by its symbolic name or numerical index).
  • set-source-mute SOURCE 1|0|toggle โ€” set the mute status of the specified source (identified by its symbolic name or numerical index).
  • set-sink-input-mute INPUT 1|0|toggle โ€” set the mute status of the specified sink input (identified by its numerical index).
  • set-source-output-mute OUTPUT 1|0|toggle โ€” set the mute status of the specified source output (identified by its numerical index).
  • set-sink-formats SINK FORMATS โ€” set the supported formats of the specified sink (identified by its numerical index) if it's supported by the sink. FORMATS is specified as a semi-colon (;) separated list of formats in the form 'encoding[, key1=value1, key2=value2, ...]' โ€” for example, AC3 at 32000, 44100 and 48000 Hz would be specified as 'ac3-iec61937, format.rate = "[ 32000, 44100, 48000 ]"'. For the possible encodings, go peek at https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SupportedAudioFormats/ ๐ŸŒˆ
  • send-message RECIPIENT MESSAGE MESSAGE_PARAMETERS โ€” send a message to the specified recipient object. If applicable, an additional string containing message parameters can be specified. A string gets returned as a response to the message. For the available messages, see https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/doc/messaging_api.txt. ๐Ÿ“จ
  • subscribe โ€” subscribe to events. Heads up: pactl does not exit by itself here, it just keeps waiting for new events. It's giving "I could stay here forever." ๐Ÿซ 

๐Ÿ’œ AUTHORS ๐Ÿ’œ

The PulseAudio Developers <pulseaudio-discuss (at) lists (dot) freedesktop (dot) org>; PulseAudio is available from http://pulseaudio.org/


๐Ÿซถ SEE ALSO ๐Ÿซถ

pulseaudio(1), pacmd(1)


And that's the whole page, bestie โ€” shoutout to the Manuals collection and the User section, where page pactl(1) lives and thrives. Now go control that sound server, you absolute icon. ๐Ÿ‘‘๐Ÿ’…โœจ