Session ManagementPrefix + d
detach-client
Short form: detach
Detach the current client or the client specified by -t from its session. The session continues running in the background.
Synopsis
bash
tmux detach-client [-aP] [-E shell-command] [-s target-session] [-t target-client]Options
| Flag | Description |
|---|---|
| -a | Detach all clients except the one specified by -t |
| -P | Send SIGHUP to parent process (usually the shell) |
| -t target-client | Specify which client to detach |
| -s target-session | Detach all clients from specified session |
Examples
Detach current client
bash
tmux detachDetach using keybinding (most common)
bash
Prefix + dDetach all other clients
bash
tmux detach -aDetach all clients from 'mysession'
bash
tmux detach -s mysessionDefault Keybinding
Prefix + d
Default prefix is Ctrl+b
Pro Tips
- •Detaching keeps your session alive - you can reattach later
- •Use this before closing your SSH connection to keep work running
- •Prefix + d is the most common way to detach