我有一个tmux会话,窗口太小,因为有些用户在某处连接。
如何告诉tmux断开所有连接用户的连接?
答案 0 :(得分:255)
您可以使用<prefix> D
(默认情况下前缀为C-b
)来选择要分离的客户端;它还会列出col / lines以及上次使用的时间。请注意大写D
,即 Shift + d 。
您也可以使用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.
来自<prefix>:
后跟detach [options]
或位于tmux内的命令行tmux detach [options]
答案 1 :(得分:123)
tmux a -dt <session-name>
a=attach
d=detach other clients (so only you can attach to this session)
t=target