Skip to main content
Back to Commands
Window ManagementPrefix + c

new-window

Short form: neww

Create a new window. If -t is given, the new window is created at the specified index. If a shell-command is given, it is executed in the new window.

Synopsis

bash
tmux new-window [-abdkPS] [-c start-directory] [-e environment] [-F format] [-n window-name] [-t target-window] [shell-command]

Options

FlagDescription
-aInsert new window next to current (after)
-bInsert new window next to current (before)
-dDon't make the new window the current window
-n window-nameSpecify the window name
-t target-windowSpecify window index
-c start-directorySpecify starting directory

Examples

Create new window

bash
tmux new-window

Create window named 'logs'

bash
tmux neww -n logs

Create window in specific directory

bash
tmux neww -c ~/projects

Create window running htop

bash
tmux neww 'htop'

Run command in background window

bash
tmux neww -d -n background 'make build'

Default Keybinding

Prefix + c

Default prefix is Ctrl+b

Pro Tips

  • New windows inherit the current pane's directory by default in modern tmux
  • Use -c #{pane_current_path} in your config to always start in current directory