Send the same command to all tmux panes
Turn on tmux pane synchronization to type the same command in every pane of a window.
tmux can send the same input to every pane of a window. This is useful for running the same command on several servers opened side by side.
Turn on pane synchronization
- Press
Ctrl-b, then:to open the tmux command prompt. - Enter the following command:
setw synchronize-panes on
Turn it off
Open the command prompt again (Ctrl-b then :) and enter:
setw synchronize-panes off
Clear the pane history
At the same command prompt:
clear-history
Notes
- Every keystroke is sent to all panes of the window. Check that synchronization is on before typing a destructive command.
- tmux cheat sheet: tmuxcheatsheet.com