How to exit tmux
Leave but keep everything running — or actually quit:
keysprefix + d (detach)
Three different "exits"
Detach (prefix d) leaves everything running — you can come back. exit/Ctrl-d closes the current pane; do it in the last pane of the last window and the session ends. tmux kill-server stops absolutely everything. Most "how do I exit tmux" frustration is not knowing which of these you want — usually it's detach.
If you're stuck
In copy mode (scrolling)? Press q. In a weird full-screen view (clock, tree picker)? Press q or Escape. Terminal frozen after Ctrl-s? Press Ctrl-q — that's terminal flow control, not tmux.
Related
Verified against tmux 3.6 · updated July 2026 · back to the full cheat sheet