Using tmux synchronize-panes to Broadcast Commands Across Panes
Learn how to enable tmux's synchronize-panes option so keystrokes in one pane are mirrored to all others, with steps to enable, verify, and safely disable the feature.
21 Jan 2026, 16:16 UTC

Desired outcome
Enable tmux’s synchronize-panes option so that any keystrokes typed in the active pane are reproduced in every other pane of the same window. This lets you run a command once and see identical output across all panes.
Prerequisites
- tmux version 1.8 or later (the
synchronize-panesoption was introduced in 1.8). - An active tmux session containing at least two panes, created with
split-window(horizontal or vertical).
Procedure
- Determine your tmux prefix; the default is Ctrl+b. If you have changed it, use that key combination.
- Enter command mode: press the prefix, then :.
- At the prompt, type
set-option synchronize-panes onand press Enter. - (Optional) To make toggling easier, add a binding to your
~/.tmux.conf:
After saving, reload the configuration withbind C-s set-option synchronize-panestmux source-file ~/.tmux.conf(run inside a tmux pane).
Expected checks
- Verify the option is active:
tmux show-options -g synchronize-panesshould returnon. - In the active pane, type a simple command such as
echo testand press Enter. Observe that the exact same line appears in every other pane. - To confirm it is limited to input, run a command that produces different output in each pane (e.g.,
hostnameon different machines) while synchronization is off; the outputs will differ, proving that only keystrokes are mirrored.
Recovery options
- Disable synchronization: prefix, :, then
set-option synchronize-panes offfollowed by Enter. - If you are about to run a potentially destructive command (e.g.,
rm,dd), turn synchronization off first to avoid executing it simultaneously in all panes. - Closing or unlinking a pane removes it from the synchronized set; the remaining panes stay synchronized if the option remains on.
Limitations
The synchronize-panes option only mirrors incoming keystrokes. It does not copy existing pane contents, scrollback history, or output that is generated independently in each pane. Therefore, panes may diverge after running commands that produce different results, even while synchronization remains enabled.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.