Create collections of panes using tmux windows

Bonnie Eisenman
InstructorBonnie Eisenman
Share this video with your friends

Social Share Links

Send Tweet
Published 8 years ago
Updated 6 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.

egghead
egghead
~ 28 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today