How do I disconnect all other users in tmux?

前端 未结 2 582
情话喂你
情话喂你 2020-12-22 16:04

I\'ve got a tmux session where the window is too small because some user somewhere is connected.

How do I tell tmux to disconnect all connected users?

相关标签:
2条回答
  • 2020-12-22 16:40

    tmux a -dt <session-name>

    a=attach
    d=detach other clients (so only you can attach to this session)
    t=target
    
    0 讨论(0)
  • 2020-12-22 16:44

    You can use <prefix> D (where prefix is C-b by default), to chose which clients to detach; it will also list they col/lines as well as the last used time. Note the uppercase D, i.e. Shift+d.

    You could also use tmux's detach-client option

     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 speci-
             fied 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.
    

    either from <prefix>:followed by detach [options] or on the command line inside tmux with tmux detach [options]

    0 讨论(0)
提交回复
热议问题