dem*_*ure 286
您可以使用<prefix> D (C-b默认情况下为prefix ),以选择要分离的客户端; 它还会列出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.
Run Code Online (Sandbox Code Playgroud)
从tmux里面的命令行<prefix>:跟随detach [options]或者tmux detach [options]
小智 143
tmux a -dt <session-name>
a=attach
d=detach other clients (so only you can attach to this session)
t=target
Run Code Online (Sandbox Code Playgroud)
Cor*_*mer 12
我将把@PEdroArthur的精彩评论分解成一个单独的答案,因为它直接回答了最常见的用例:“在 tmux 会话中并希望断开所有其他会话”
从tmux 会话中运行此命令:
tmux detach-client -a
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
63385 次 |
| 最近记录: |