How to create a new tab in tmux?

Quick Answer

In tmux, tabs are called "windows." To create a new tab/window, press Ctrl+b followed by c. You can also use the command tmux new-window or its shorthand tmux neww.

Ctrl+b+c

Detailed Explanation

In tmux terminology, what many terminal applications call "tabs" are referred to as "windows." Windows in tmux behave similarly to tabs in a web browser, allowing you to have multiple terminal views within a single tmux session.

Creating a new tab/window:

  • Ctrl+b c - Create a new window

Creating windows with custom names:

  • Ctrl+b : then type new-window -n name - Create window with specified name
  • tmux new-window -n name - From outside tmux

Creating windows with specific commands or directories:

  • tmux new-window -c /path/to/directory - Start in specific directory
  • tmux new-window "top" - Run command in new window
  • tmux new-window -n monitor "htop" - Named window with command

Navigating between tabs/windows:

  • Ctrl+b 0-9 - Switch to window 0-9
  • Ctrl+b n - Next window
  • Ctrl+b p - Previous window
  • Ctrl+b w - List windows (interactive selection)
  • Ctrl+b f - Find window by name
  • Ctrl+b l - Last active window

Pro Tip: Current Directory

By default, new windows start in the directory where tmux was originally started. To make new windows open in the current directory, add this to your ~/.tmux.conf:

bind c new-window -c "#{pane_current_path}"

Window Status Bar

The tmux status bar shows your open windows/tabs. The current window is highlighted. To rename a window, press Ctrl+b , (comma).