Window ManagementN/A (bind to a key)
swap-window
Short form: swapw
Swap two windows so they exchange positions. With -d the active window is not changed to follow the move.
Synopsis
bash
tmux swap-window [-d] [-s src-window] [-t dst-window]Options
| Flag | Description |
|---|---|
| -d | Don't make the swapped window the current window |
| -s src-window | Source window |
| -t dst-window | Destination window |
Examples
Swap window 2 with window 1
bash
tmux swap-window -s 2 -t 1Swap current window with window 0, stay put
bash
tmux swapw -d -t 0Default Keybinding
N/A (bind to a key)
Default prefix is Ctrl+b
Pro Tips
- •Combine with -d to reorder windows without following the move
- •Use move-window to renumber rather than swap