Session ManagementPrefix + : kill-session (command mode)
kill-session
Destroy the given session, closing any windows linked to it and no other sessions, and detaching all clients attached to it.
Synopsis
bash
tmux kill-session [-aC] [-t target-session]Options
| Flag | Description |
|---|---|
| -a | Kill all sessions except the one specified by -t |
| -C | Clear alerts (bell, activity, silence) in all windows |
| -t target-session | Specify which session to kill |
Examples
Kill the session named 'dev'
bash
tmux kill-session -t devKill all sessions except the current one
bash
tmux kill-session -aKill all sessions except 'main'
bash
tmux kill-session -a -t mainDefault Keybinding
Prefix + : kill-session (command mode)
Default prefix is Ctrl+b
Pro Tips
- •Be careful - this permanently destroys the session
- •Use 'tmux kill-server' to kill all sessions at once
- •Consider detaching instead if you might need the session later