Panes โ Split, Navigate, Resize
One window, many shells, all visible at once
Panes are independent shells inside one window. Split with %, ", navigate with arrows or hjkl, zoom one full-screen with z, close with x.
Panes
A pane is one shell inside one rectangle. A window can hold any number of panes. The active pane is the one your keystrokes go to; tmux marks it with a brighter border (and a status-bar indicator). Splitting, navigating, zooming, and closing panes are the operations you'll do most often in tmux.
| Keys | Action |
|---|---|
| Ctrl-B% | Split current pane left/right |
| Ctrl-B" | Split current pane top/bottom |
| Ctrl-Bo | Cycle to the next pane |
| Ctrl-B; | Toggle to the previously-active pane |
| Ctrl-BUp Down Left Right | Move focus in that direction |
| Ctrl-Bh j k l | Same, if you remap (see below) |
| Ctrl-Bz | Toggle zoom โ the pane fills the whole window |
| Ctrl-Bx | Kill the current pane (confirm with y) |
| Ctrl-Bq | Show pane numbers; press 0โ9 to jump |
| Ctrl-B! | Break the pane out into its own window |
| Ctrl-BSpace | Cycle through preset layouts |
| Ctrl-B{ | Swap pane with previous |
| Ctrl-B} | Swap pane with next |
hjkl Navigation
Default tmux uses the arrow keys for pane navigation. Most Vim users prefer hjkl for the same reason they use hjkl in Vim โ home row stays under your fingers. To enable, add to ~/.tmux.conf:
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
Note that this shadows tmux's default Ctrl-Bl ("last window"). The standard fix is to rebind last-window to a key tmux doesn't otherwise use:
bind Tab last-window
Watch
See also: The Prefix Key, Windows, Creating Splits