如何断开tmux中所有其他用户的连接?

内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用

  • 回答 (2)
  • 关注 (0)
  • 查看 (33)

我有一个tmux会话,窗口太小了,因为某个用户已经连接到了某个位置。

如何告诉tmux断开所有连接的用户?

提问于
用户回答回答于

您也可以使用tmux的detach-client

 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.

用户回答回答于

tmux a -dt <session-name>

a=attach
d=detach other clients (so only you can attach to this session)
t=target

扫码关注云+社区