Creating a new tmux window adds another full-screen workspace inside an existing tmux session. It is the clearest way to separate shells, editors, logs, or one-off commands without changing the pane layout in the window you are already using.

The new-window command creates the window at the next unused index unless you target a specific slot, and -n gives it a predictable label instead of leaving the name to the default shell or running command. When you are already attached to the session, the default shortcut Ctrl+b then c runs the same action in the current session.

Printing the result with -P confirms which session and window index tmux created, and list-windows shows whether the new window became current. If your configuration changes base-index from the default 0, the same workflow still works but the first window number starts at your configured base instead.

Steps to create a window in tmux:

  1. Create the new window in the target session and print the created session and window identifier.
    $ tmux new-window -t work: -n logs -P -F '#{session_name}:#{window_index}:#{window_name}'
    work:1:logs

    The -t work: target tells tmux which session receives the new window, and omitting a window number lets tmux use the next unused index.

    If you are already inside the target session and still use the default prefix, press Ctrl+b then c to create the next window without typing the full command.

    If tmux returns can't find session: work, create or attach the session first so there is a real session to receive the new window.

  2. List the windows in that session to confirm the new window exists and that tmux switched to it.
    $ tmux list-windows -t work
    0: shell- (1 panes) [80x24] [layout b25d,80x24,0,0,0] @0
    1: logs* (1 panes) [80x24] [layout b25e,80x24,0,0,1] @1 (active)

    The asterisk marks the current window, and sessions that keep the default base-index start numbering at 0.

  3. Add -d when the new window should open in the background and leave the current window selected.
    $ tmux new-window -d -t work: -n app -P -F '#{window_index}:#{window_name}'
    2:app

    Add -c /path/to/project when the new window should start in a specific working directory instead of inheriting the current one.