Resizing tmux panes

Written on August 3, 2016
Updated on January 10, 2024

Being able to have multiple panes in a single terminal window using tmux has definitely improved my workflow.

By default when creating panes, tmux will split the window up into 50% splits. But what if you don’t need certain panes to have so much real estate and focus? You just want a small pane to keep an eye on things.

I recently discovered you can resize tmux panes. To resize tmux panes, you’ll first want to hit your prefix — ctrl + b by default — and then the colon key :. What this does is brings up a prompt at the bottom of your screen.

Now you’ll want to type in resize-pane in the prompt, followed by a hyphen - and either D, U, L, R. Which you can probably guess stands for down, up, left and right, the direction in which you want your pane to be resized. When using the resize-pane command, the resize will be applied to the last pane that had focus.

Here is an example of the entire resize pane command that resizes the pane to the left by a cell — the unit in which tmux resizes:

// This assumes that you've hit ctrl + b and : to get to the command prompt
:resize-pane -L

Here are some additional tmux pane resizing examples:

:resize-pane -D (Resizes the current pane down)
:resize-pane -U (Resizes the current pane upward)
:resize-pane -L (Resizes the current pane left)
:resize-pane -R (Resizes the current pane right)
:resize-pane -D 10 (Resizes the current pane down by 10 cells)
:resize-pane -U 10 (Resizes the current pane upward by 10 cells)
:resize-pane -L 10 (Resizes the current pane left by 10 cells)
:resize-pane -R 10 (Resizes the current pane right by 10 cells)

Stay in touch

Thanks for reading this article. I'd love to stay in touch and share more tips on programming and side projects with you. Sign up and I'll send you my articles straight to your email, you'll also get a free copy of the light themed version of my Git cheat sheet.
Git cheat sheet preview image