Back to the cards

Create window

Windows in tmux are like tabs in a browser. Each window is a full-screen terminal inside your session, and you can have as many as you need. The status bar at the bottom shows all your windows as a numbered list, with an asterisk (*) marking the active one.

To create a new window, press:

Ctrl-b c

That's the prefix key (Ctrl-b) followed by c (for "create"). A fresh shell appears instantly, and you'll see a new entry in your status bar.

Windows are numbered starting from 0. When you create your first extra window, you'll have window 0 and window 1. The status bar might look like:

[mysession] 0:zsh  1:zsh*

The * shows you're on window 1. You can also name a window at creation time from the command line:

tmux new-window -n logs

Or create a window that immediately runs a command:

tmux new-window -n htop 'htop'

Try It Now

  1. If you're not already in tmux, start a session: tmux new -s practice
  2. Press Ctrl-b c to create a new window
  3. Notice the status bar now shows two windows — you're on the new one
  4. Press Ctrl-b 0 to jump back to window 0
  5. Press Ctrl-b 1 to return to window 1
  6. Try creating a third window with Ctrl-b c again
  • Navigate windows — Move between your windows with Ctrl-b n (next), Ctrl-b p (previous), or Ctrl-b [number]
  • Rename window — Give windows meaningful names with Ctrl-b , so you know which is which
  • Close window — Kill a window you no longer need with Ctrl-b &
Rate this tip