Home Writing

til / organize panes in tmux

Organizing our windows is great, but what about our panes? If you’re like me, you like having them in a certain order. Here’s how to easily rearrange them to get them just right.

Press Ctrl + b (<C-b>), tmux’s default command prefix, followed by } to swap the pane with the next one. Alternatively, use <C-b>:swap-pane -D. To swap the pane with the previous one, press <C-b>{ or <C-b>:swap-pane -U.

Furthermore, use <C-b>q to show pane numbers and then move a pane to a specific number. To move the current pane to pane 3, type <C-b>:swap-pane -t 3. To move pane 2 to pane 3, type <C-b>:swap-pane -s 2 -t 3.

If you want to switch a pane but keep the current as active, use -d: <C-b>:swap-pane -U -d.

Bonus: If you wish to get fancy, use swapp, an alias for swap-pane.


  • Loading next post...
  • Loading previous post...