tmux windows can hold several independent shells on the same terminal screen. A horizontal pane split places one shell above another, keeping both visible while each runs its own commands.

tmux names split directions by the arrangement of the panes. It calls the top-and-bottom layout a vertical split, even though the divider is horizontal; its horizontal split creates left and right panes.

An attached tmux session is required, and the shortcuts assume the default prefix and key bindings. Splitting affects the active pane, leaves its running program in the upper half, and starts a new shell in the lower half.

Steps to split a pane horizontally in tmux:

  1. Split the active pane with Ctrl+b followed by “.
    C-b "

    C-b means holding Ctrl while pressing b, then releasing both keys before pressing the double-quote character. This creates the same top-and-bottom layout as split-window -v. If tmux reports there is no space for another pane, enlarging the terminal provides more rows.

  2. Return to the upper pane with Ctrl+b followed by Up.
    C-b Up

    The new lower pane receives input immediately after the split. The cursor in the lower shell shows the starting position before switching back to the upper shell.

  3. List the panes from the upper shell to confirm both are present.
    $ tmux list-panes
    0: [72x9] [history 0/2000, 540 bytes] %0 (active)
    1: [72x9] [history 0/2000, 450 bytes] %1

    The two entries identify separate panes, and (active) marks the upper pane where the command ran. Dimensions, history sizes, and pane numbers depend on the existing window. Both shell prompts remain visible on opposite sides of the horizontal divider.

Share this guide