A split tmux window can become hard to use when one command needs more columns or rows than the neighboring pane. Resizing the active pane moves that pane's border without closing shells, changing sessions, or rebuilding the whole window layout.
Tmux exposes pane resizing through default prefix bindings and the resize-pane command. With the default prefix, C-b C-Left, C-b C-Right, C-b C-Up, and C-b C-Down adjust by one cell, while the matching Meta arrow bindings adjust by five cells.
The resize target is the active pane unless a command names another pane with -t. A split window is required before resizing has a visible effect, and terminals that intercept Ctrl or Alt arrow keys can use the command prompt or a shell command with -L, -R, -U, -D, -x, or -y.
Related: How to split a pane horizontally in tmux
Related: How to split a pane vertically in tmux
Related: How to enable mouse support in tmux
Need another pane first: How to split a pane horizontally in tmux or How to split a pane vertically in tmux.
C-b q C-b Left C-b Right C-b Up C-b Down
Use the configured prefix instead of C-b when the session has a custom prefix.
Related: How to select a pane in tmux
C-b C-Left C-b C-Right C-b C-Up C-b C-Down
The default resize bindings are repeatable, so after the prefix you can keep pressing the same arrow while tmux still accepts repeat input.
C-b M-Left C-b M-Right C-b M-Up C-b M-Down
On many keyboards Meta is Alt. Use the command prompt when the terminal or desktop environment captures that key.
C-b : resize-pane -R 5
Use -L, -R, -U, or -D to move the active pane edge left, right, up, or down by the number of columns or rows given after the command.
Related: How to use the tmux command prompt
resize-pane -x 80
Use resize-pane -y 20 when the active pane needs a fixed height in rows. Exact sizes are still limited by the total window size and the minimum size of neighboring panes.
$ tmux resize-pane -t demo:0.0 -R 10
The target format is session:window.pane. In this example demo:0.0 means pane 0 in window 0 of session demo.
$ tmux list-panes -t demo:0 -F '#P:#{pane_width}x#{pane_height}:#{pane_active}'
0:80x30:1
1:19x30:0
The fields are pane:widthxheight:active because #P prints the pane index. The value 0:80x30:1 confirms pane 0 is active and 80 columns wide after the exact-width resize.