$linuxjunkies
>

pw-link(1)

Create connections between PipeWire ports to route audio and video between applications.

UbuntuDebianFedoraArch

Synopsis

pw-link [OPTION]... [INPUT_PORT] [OUTPUT_PORT]

Description

pw-link is a PipeWire command-line tool for creating and managing connections between audio and video ports. It allows you to route media streams between applications, devices, and virtual ports without restarting services.

Use it to connect an output port (source) to an input port (sink). You can list available ports, create new connections, and disconnect existing ones. Port names can be specified by index, name, or object properties.

Common options

FlagWhat it does
-h, --helpShow help message and exit
-l, --list-allList all available input and output ports with details
-I, --list-inputsList only input ports (sinks)
-O, --list-outputsList only output ports (sources)
-d, --disconnectDisconnect specified ports instead of connecting them
-p, --propertiesShow properties of ports and connections
-r, --remoteConnect to specific PipeWire remote (default: default)
-v, --verboseShow verbose output with additional details

Examples

List all available audio and video ports with their IDs and names

pw-link -l

Show only input ports (sinks) where audio can be sent

pw-link -I

Show only output ports (sources) that produce audio or video

pw-link -O

Route Firefox audio output to the default ALSA speaker device

pw-link 'alsa_output.pci-0000_00_1f.3.analog-stereo' 'Firefox:playback_FL'

Disconnect the link between port 45 (output) and port 47 (input)

pw-link -d 45 47

Connect PulseAudio playback to a JACK audio application

pw-link 'PulseAudio:playback_FL' 'JACK:input_1'

Display detailed properties of the microphone capture port

pw-link -p 'Microphone:capture_FL'

Related commands