To resize a pane in tmux, press Ctrl+b
followed by one of the arrow keys to adjust in that direction. Hold Ctrl
while pressing the arrow for larger 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 ↑
- Resize pane upward (make current pane taller)Ctrl+b ↓
- Resize pane downward (make current pane shorter)Ctrl+b ←
- Resize pane left (make current pane narrower)Ctrl+b →
- Resize pane right (make current pane wider)Ctrl+b Ctrl+↑
- Resize pane upward by 5 cellsCtrl+b Ctrl+↓
- Resize pane downward by 5 cellsCtrl+b Ctrl+←
- Resize pane left by 5 cellsCtrl+b Ctrl+→
- 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.