Working with Panes

Having programs in separate windows is fine for stuff we don’t mind having out of the way. But with tmux, we can divide a single session into panes.

Create a new tmux session called “panes” so we can experiment with how panes work. Exit any existing tmux sessions and create a new one like this:

 $ ​​tmux​​ ​​new​​ ​​-s​​ ​​panes

We can split windows vertically or horizontally. Let’s split the window in half vertically first, and then horizontally, creating one large pane on the left and two smaller panes on the right, as shown in the figure.

images/basics/panes.png

In the tmux session, press Prefix %, and the window will divide down the middle and ...

Get tmux 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.