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
| Flag | Description |
|---|---|
| -a | Insert new window next to current (after) |
| -b | Insert new window next to current (before) |
| -d | Don't make the new window the current window |
| -n window-name | Specify the window name |
| -t target-window | Specify window index |
| -c start-directory | Specify starting directory |
Examples
Create new window
bash
tmux new-windowCreate window named 'logs'
bash
tmux neww -n logsCreate window in specific directory
bash
tmux neww -c ~/projectsCreate 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