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 take a single session and divide it into panes.

Let’s 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, giving us one large pane on the left and two smaller panes on the right, just like Figure 4, A tmux session divided into panes.

In the tmux session, press Prefix %, and the window will divide down the middle and start up a second session in the new pane. In addition, the focus ...

Get tmux 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.