我有一个tmux会话,因为某个用户连接了,所以窗口太小了。
我该如何告诉tmux断开所有已连接的用户?
<prefix> D
(其中默认前缀为C-b
),选择要分离的客户端;它还将列出它们的列/行以及最后使用的时间。请注意大写的D
,即Shift+d。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]
,都可以分离(detach)当前会话。tmux a -dt <session-name>
a=attach
d=detach other clients (so only you can attach to this session)
t=target
tmux detach-client -a
可以分离除当前客户端之外的所有其他客户端。我经常打错prefix-D
,所以我更喜欢使用这种方式。我甚至有一个函数detachothers () { tmux detach-client -a;
。 - PEdroArthur