How to kill a tmux session
Kill a named session:
Cleanup patterns
tmux kill-session -a kills every session except the one you're in — the fastest way to clean up. tmux kill-server stops everything, including the tmux server itself. From inside a session, prefix : then kill-session ends the current one.
Killing ≠ detaching
If you just want to leave but keep things running, that's prefix d (detach). Kill actually terminates every process in the session.
Related
Verified against tmux 3.6 · updated July 2026 · back to the full cheat sheet