Resizing tmux panes

Written by Michael Lee on August 3, 2016

I’ve been using tmux daily for about a month now and have been really enjoying it. Being able to have multiple panes in a single terminal window 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)
Thanks for taking the time to read this article. I'd love to stay in touch and share more tips on programming and design, side projects and working remotely. Sign up and I'll send you my articles straight to your email.

:wave: Hey hey, I'm Michael Lee! I really appreciate you taking the time to read this article.

Be sure to check out my other articles.