Intermediate · 8 min · practise every command in the built-in terminal

tmux Panes

Panes split a single window into multiple side-by-side terminals — great for watching logs while editing code.

Split shortcuts (after prefix Ctrl+b)

KeysAction
%Split vertically (side by side)
"Split horizontally (stacked)
Arrow keysMove between panes
xClose current pane
zZoom current pane fullscreen (toggle)
Ctrl+arrowResize pane

From the command line

tmux split-window -h        # Horizontal split (side by side)
tmux split-window -v        # Vertical split (stacked)

A typical layout

+-------------------+-------------------+
|                   |                   |
|   vim editor      |   tail -f app.log |
|                   |                   |
+-------------------+-------------------+
|            htop (bottom pane)         |
+----------------------------------------+

Built with: split-window -h, then in the right pane split-window -v.

Practice tasks

  1. Split the current tmux window horizontally (side by side)
  2. Split the window vertically (stacked) as well
  3. Start a new session and immediately split it into two panes

Commands in this lesson

tmux & Screen