Skip to main content

Pane Management

Panes split a window into multiple independent terminals. This lets you view your editor, logs, and shell simultaneously without switching windows.

Core Idea

Think of panes as the "split view" inside a single window tab. Each pane runs its own shell.

Splitting Panes

Default ShortcutModification ShortcutAction
Ctrl+b %`Ctrl+Space`
Ctrl+b "Ctrl+Space -Horizontal split (top and bottom)

From command line:

# vertical split
tmux split-window -h -t work:0

# horizontal split
tmux split-window -v -t work:0

# split with a start command
tmux split-window -h "tail -f /var/log/app.log"
Custom Keybindings — Defaults Preserved

The added prefix-free shortcuts produce the same results as their default counterparts:

Default ShortcutModification ShortcutAction
Ctrl+b ←/→/↑/↓Alt+←/→/↑/↓select-pane -L/R/U/D
Ctrl+b ←/→/↑/↓Alt+h/j/k/lselect-pane -L/D/U/R (vim-style)
Ctrl+b zAlt+zresize-pane -Z (toggle zoom)
Default ShortcutModification ShortcutAction
Ctrl+b ←/↑/→/↓Alt+←/↑/→/↓ or Alt+h/j/k/lMove focus by arrow key
Ctrl+b oCtrl+Space oCycle through panes
Ctrl+b ;Ctrl+Space ;Last active pane
Ctrl+b qCtrl+Space qShow pane numbers briefly (press number to jump)

Resizing Panes

Default ShortcutModification ShortcutAction
Ctrl+b Alt+arrowsCtrl+Space Alt+arrowsResize by 5 cells
Ctrl+b Ctrl+arrowsCtrl+Space Ctrl+arrowsResize by 1 cell

Or use the command prompt:

:resize-pane -L 10 # left
:resize-pane -R 10 # right
:resize-pane -U 5 # up
:resize-pane -D 5 # down

Zoom (Full-Screen a Pane)

Default ShortcutModification ShortcutAction
Ctrl+b zCtrl+Space z or Alt+zToggle zoom on current pane

One pane fills the whole window. Press again to return to split view.

tip

Use zoom when you need to focus on one task, then unzoom to return to your multi-pane layout.

Closing Panes

# inside the pane
exit
Default ShortcutModification ShortcutAction
Ctrl+b xCtrl+Space xKill current pane (confirm with y)
# kill specific pane from outside
tmux kill-pane -t work:0.1 # session:window.pane

Moving and Swapping Panes

Default ShortcutModification ShortcutAction
Ctrl+b {Prefix S Left/hMove current pane left
Ctrl+b }Prefix S Right/lMove current pane right

Or:

# swap pane 1 and pane 2 in current window
tmux swap-pane -s 1 -t 2

Breaking a Pane into Its Own Window

Default ShortcutModification ShortcutAction
Ctrl+b !Ctrl+Space !Break current pane into a new window

Useful when a pane grows too important for the split view.

Pane Targeting Syntax

When addressing panes from the command line: session:window.pane

# send a command to a specific pane
tmux send-keys -t work:editor.0 "ls -la" Enter

# work → session name
# editor → window name (or index)
# 0 → pane index (0-based)

Common Pane Layouts

Side-by-Side (Editor + Shell)

┌─────────────┬─────────────┐
│ │ │
│ vim │ shell │
│ │ │
└─────────────┴─────────────┘
tmux split-window -h

Editor + Logs Below

┌──────────────────────────┐
│ vim │
├──────────────────────────┤
│ tail -f │
└──────────────────────────┘
tmux split-window -v

Three-Pane Dashboard

┌─────────────┬─────────────┐
│ │ top │
│ vim ├─────────────┤
│ │ logs │
└─────────────┴─────────────┘
tmux split-window -h
tmux split-window -v
tmux select-pane -t 0

Common Pitfalls

PitfallSymptomFix
Pressing Ctrl+b x accidentallyWrong pane killedLearn the shortcut; press n when prompted
Too many panes in one windowCramped viewUse multiple windows instead
Losing track of pane boundariesConfusion about where to typeUse Ctrl+b q to confirm pane numbers

What's Next