我在桌面上工作时使用 tmux,然后如果我想在笔记本电脑上在户外工作,我会通过 ssh 连接到桌面并附加到同一个会话。然后,当我关闭笔记本电脑并返回内部时,桌面上可见的会话会缩小,仅显示较小笔记本电脑屏幕上可用的行/列。无需再次打开我的笔记本电脑,是否有某种方法可以强制笔记本电脑与会话分离?或者至少调整 tmux 的大小以使用桌面屏幕上的所有可用空间?
dem*_*ure 44
默认情况下,<prefix> D
为您提供已连接客户端的列表,您选择的任何一个都已断开连接。
您还可以choose-client
从命令行使用作为 tmux 的增强,或在 tmux 的命令行中使用<prefix> :
其中前缀C-b
默认为
Gau*_*ava 13
你也可以这样做
tmux attach -t <tmux_session_name> -d
Run Code Online (Sandbox Code Playgroud)
这将分离所有其他附加的客户端,并附加这个新客户端。
小智 10
如果尚未进入 tmux 会话,您可以像这样分离“其他”客户端:
tmux detach-client
Run Code Online (Sandbox Code Playgroud)
来自 tmux 手册页:
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.
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
13342 次 |
最近记录: |