Attach and Detach in tmux

From the tmux cheat sheet ยท Sessions ยท verified Aug 2026

Attach and Detach

Reconnect clients without stopping running programs.

bash
tmux attach-session -t backend
๐Ÿ“Œ Detaching leaves the session running
๐Ÿ’ก Use attach -d when a stale client owns the session
โšก Ctrl-b d detaches the current client
๐Ÿ” Multiple clients can view one session
attachdetachclients

Continue with tmux

Save the full cheat sheet or work through every related task.

More tmux tasks

Back to the full tmux cheat sheet