How to swap and rearrange panes in tmux
Swap the current pane with the previous or next one:
keysprefix + { (previous) · } (next)
Precise swaps with a mark
Mark the first pane with prefix m, move to the other pane, then run swap-pane from the command prompt (prefix :) — the current pane and marked pane trade places. Works across windows.
Rearranging everything
prefix C-o rotates every pane one position around the layout. prefix Space cycles preset layouts, which often beats manual rearranging when things get messy.
Related
Verified against tmux 3.6 · updated July 2026 · back to the full cheat sheet