Create collections of panes using tmux windows

Bonnie Eisenman
InstructorBonnie Eisenman

Share this video with your friends

Send Tweet
Published 6 years ago
Updated 4 years ago

In tmux, a window is a collection of panes. Creating multiple windows is a great way to organize your workspace. In this lesson, we'll cover:

  • How to create a new window within a tmux session, using C-b c
  • Navigating between windows with C-b n and C-b p

[00:00] Let's start a new Tmux session by typing tmux. Next, we'll open up a couple of panes with control b" and control b %. I'm using the to do MVC. JavaScript project is my example here. This is great. I'm set up, and I'm thinking about this view example. Now I want to [inaudible] switch. I want to work on a different project.

[00:20] Instead of having to close my panes and rearrange them, using Tmux I can create a new window, which is a collection of panes. I do that with control b c. C stands for create. My status bar changes to reflect the fact that I'm currently in window number one.

[00:35] I had been in window zero which is currently active in the last program. Number one is currently using bash. The asterisk indicates that this is the current window. Now, I can get to work in this window. If I want I can also divide it into panes.

[00:49] To switch back to the other window I use control b and then n. Control b n takes me to the next window. Control b p will take me to the previous window. You can see that I now I can flip between window zero and window one.

[01:03] To make this a little bit clearer, we can open another window with control b c for create. Now we have windows zero, windows one, and windows two. I can cycle through them with control b n. It goes back to zero. Control b n, it goes back to one. A third time bring us back to right where we started.