Join egghead, unlock knowledge.

Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock This Lesson
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Create collections of panes using tmux windows


    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


    Become a Member to view code

    You must be a Pro Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    orLog In




    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.

    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.

    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.

    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.

    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.