Detach the *other* tmux client(s)

By default<prefix> D gives you a list of connected clients, and which ever you select is disconnected.

You can also use choose-client from the command line as an augment to tmux, or at tmux's command line <prefix> :

where prefix is C-b by default


You can also do

tmux attach -t <tmux_session_name> -d

This will detach all other attached clients, and attached this new client.


If are not already inside a tmux session, you can detach the "other" clients like so:

tmux detach-client

from tmux man page:

detach-client [-P] [-a] [-s target-session] [-t target-client]
               (alias: detach)
         Detach the current client if bound to a key, the client specified with -t, 
or all clients currently attached to the session specified by -s.  The
         -a option kills all but the client given with -t.  If -P is given, send 
SIGHUP to the parent process of the client, typically causing it to exit.

Tags:

Tmux