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

Ctrl+b %      → Vertical split (side by side)
Ctrl+b " → 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"
Ctrl+b ←/↑/→/↓        → Move focus by arrow key
Ctrl+b o → Cycle through panes
Ctrl+b ; → Last active pane
Ctrl+b q → Show pane numbers briefly (press number to jump)

Resizing Panes

Ctrl+b Alt+←/→/↑/↓    → Resize by 5 cells
Ctrl+b Ctrl+←/→/↑/↓ → Resize 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)

Ctrl+b z     → Toggle 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

# force kill current pane
Ctrl+b x # and confirm with y

# kill specific pane from outside
tmux kill-pane -t work:0.1 # session:window.pane

Moving and Swapping Panes

Ctrl+b {     → Move current pane left
Ctrl+b } → Move 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

Ctrl+b !     → Breaks the 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