Enter Your Email Address to Watch This Lesson

Your link to unlock this lesson will be sent to this email address.

Unlock this lesson and all 983 of the free egghead.io lessons, plus get Tools content delivered directly to your inbox!



Existing egghead members will not see this. Sign in.

Zoom and resize to view a particular pane within tmux

1:39 Tools lesson by

Sometimes you'll want to zoom in on a specific pane within a tmux window. We'll learn to use C-b z to temporarily zoom in on one pane, as well as how to resize your panes with C-b -L, -R, -U, and -D.


egghead.io comment guidelines

Avatar
egghead.io

Sometimes you'll want to zoom in on a specific pane within a tmux window. We'll learn to use C-b z to temporarily zoom in on one pane, as well as how to resize your panes with C-b -L, -R, -U, and -D.

Avatar
Zhentian

found a easy way to resize pane: hold "ctrl b" then resize with arrow keys

We're working within this view.js example, we might find we want to focus on a particular pane within our tmux session. We can do this with control-B and then Z for zoom. I can work within this pane as normal, but don't worry, all of my other panes are still there.

If I type control-B and then Z again, I'll zoom back out, and now, I have all of my panes back. If you want to resize your panes, we'll go a little bit less all or nothing, tmux also provides you with controls for doing that.

We can type control-B and then colon, and get into this command mode. From here, we can type resize-pane, with a hyphen, and then -D, will resize that pane downwards. In case that wasn't dramatic enough for you, we can also specify how much we should we resize the pane.

Again, control-B colon to get into command mode, then resize-pane -D, and now, we can provide a size. For example, 30 will bring us downwards by 30 cells.

Now, I use control-B and then the down arrow key to move into the lower pane, and similarly, I can do control-B colon, and then resize-pane -U to go upwards, and let's go up by 80.

Now, you can see that we can also upwards, same goes for left and right. Control-B colon, resize-pane -R pushes just a little bit to the right. Finally, control-B colon resize-pane -L brings us to the left. It's up, down, left, and right, are your options for the flags passed to resize-pane.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?