Table of Contents

How to resize panes in tmux

Resizing panes in tmux changes how much space each command area gets inside the current window, which is useful when one pane needs more room for an editor, logs, or long command output while the others can stay smaller.

The default tmux resize workflow is keyboard-driven and works on the active pane only, so the main things to know are which pane currently has focus and which direction you want its border to move. In current tmux releases, the default prefix is Ctrl-b, then Ctrl plus an arrow key resizes by one cell and Meta plus an arrow key resizes by five cells.

The examples below assume you are already inside a tmux window that contains at least two panes and that your terminal passes the resize keys through to tmux. If you changed the prefix or your terminal captures Alt or Meta, use your custom prefix or fall back to the tmux command prompt noted below.

Steps to resize panes in tmux:

  1. Confirm the current window already contains at least two panes before resizing.
  2. Move focus to the pane that should grow or shrink before you use the resize keys.
    Prefix + o
    Prefix + Left
    Prefix + Right
    Prefix + Up
    Prefix + Down

    The resize action always affects the active pane, so changing focus first keeps you from moving the wrong border.

  3. Press the prefix and then Ctrl-Left or Ctrl-Right to shrink or grow the active pane by one column.
    Prefix + Ctrl-Left
    Prefix + Ctrl-Right
  4. Press the prefix and then Ctrl-Up or Ctrl-Down to shrink or grow the active pane by one row.
    Prefix + Ctrl-Up
    Prefix + Ctrl-Down
  5. Press the prefix and then Meta-Left, Meta-Right, Meta-Up, or Meta-Down to resize faster in five-cell steps.
    Prefix + Meta-Left
    Prefix + Meta-Right
    Prefix + Meta-Up
    Prefix + Meta-Down

    On most keyboards Meta is the Alt key, so these default bindings are commonly used as Alt+Arrow after the tmux prefix.

  6. Repeat the same direction key while tmux still accepts repeatable prefix bindings when you need several small adjustments in a row.

    The current default resize bindings are marked repeatable in tmux, which lets you keep tapping the direction key without typing the full prefix sequence every time.

  7. Verify the pane sizes after resizing with tmux list-panes.
    $ tmux list-panes -t demo:0 -F '#{pane_index}: #{pane_width}x#{pane_height} active=#{pane_active}'
    0: 50x24 active=1
    1: 29x24 active=0

    In this example pane 0 is the active pane and is wider than pane 1, which confirms that the resize took effect.

Notes