Skip to main content
Back to Commands
Window ManagementPrefix + &

kill-window

Short form: killw

Kill the current window or the window specified by -t, and all panes within it.

Synopsis

bash
tmux kill-window [-a] [-t target-window]

Options

FlagDescription
-aKill all windows except the one specified by -t
-t target-windowSpecify which window to kill

Examples

Kill current window

bash
tmux kill-window

Kill window 2

bash
tmux killw -t 2

Kill all windows except current

bash
tmux killw -a

Default Keybinding

Prefix + &

Default prefix is Ctrl+b

Pro Tips

  • You'll be prompted for confirmation with Prefix + &
  • Consider using kill-pane if you only want to close one pane