How to move and reorder windows in tmux
Move the current window to index 2, or swap two windows:
Close the gaps
After killing windows you're left with 0, 1, 4, 7. move-window -r renumbers everything sequentially, and this setting does it automatically forever:
~/.tmux.conf
set -g renumber-windows onDrag-style reordering
Bind Shift+arrow to bubble the current window left or right:
~/.tmux.conf
bind -r "<" swap-window -d -t -1
bind -r ">" swap-window -d -t +1Related
Verified against tmux 3.6 · updated July 2026 · back to the full cheat sheet