To resize a pane in tmux, press Ctrl+b
followed by Ctrl+arrow keys
to adjust in that direction by one cell. Use Alt+arrow keys
after the prefix for larger (5-cell) adjustments.
Tmux allows you to resize panes to optimize your workspace layout. You can resize panes using keyboard shortcuts, mouse interactions (if enabled), or tmux commands. Here's how to adjust pane sizes to fit your needs.
Ctrl+b Ctrl+↑
- Resize pane upward by 1 cell (make current pane taller)Ctrl+b Ctrl+↓
- Resize pane downward by 1 cell (make current pane shorter)Ctrl+b Ctrl+←
- Resize pane left by 1 cell (make current pane narrower)Ctrl+b Ctrl+→
- Resize pane right by 1 cell (make current pane wider)Ctrl+b Alt+↑
- Resize pane upward by 5 cellsCtrl+b Alt+↓
- Resize pane downward by 5 cellsCtrl+b Alt+←
- Resize pane left by 5 cellsCtrl+b Alt+→
- Resize pane right by 5 cellsCtrl+b :
then type resize-pane -U 10
- Resize up by 10 cellsCtrl+b :
then type resize-pane -D 10
- Resize down by 10 cellsCtrl+b :
then type resize-pane -L 10
- Resize left by 10 cellsCtrl+b :
then type resize-pane -R 10
- Resize right by 10 cellsCtrl+b :
then type resize-pane -t 1 -U 10
- Resize pane 1 up by 10 cellsCtrl+b :
then type resize-pane -Z
- Toggle zoom (maximize/restore) current paneCtrl+b z
- Shortcut to toggle zoom on current pane If mouse mode is enabled (set -g mouse on
in your .tmux.conf), you can resize panes by clicking and dragging the pane border.
Use Ctrl+b Alt+1
through Ctrl+b Alt+5
to quickly switch between preset layouts like even-horizontal, even-vertical, main-horizontal, main-vertical, and tiled.