Cheatsheet Pages / tmux Cheatsheet

How to detach from tmux and leave everything running — prefix d

You are done for now but the build, the download or the server must keep running after you leave.

tmux's default prefix is Ctrl-b: “prefix c” means press Ctrl-b, let go, then press c. Every CLI command was run for real against tmux 3.4 in detached test sessions, and every prefix binding was checked against the default binding table.

# inside tmux: press prefix (Ctrl-b), then d
tmux detach-client          # the same detach, run as a command
tmux detach-client -s work  # detach every client attached to session "work"

Good to know

Detach is not exit: the shell, the build, the long-running job — all keep going inside the session. This is the feature that makes tmux worth learning; everything else is organisation.

tmux Cheatsheet one-page card — commands that actually work
The full one-page card — tmux Cheatsheet. Get the complete cheatsheet on GitHub