我们尝试通过终止进程来删除它们,但它们仍然存在。用户显示如下
can't access root pts/18 tmux(1804832).%13
can't access root pts/19 tmux(1804832).%15
can't access root pts/20 tmux(1804832).%16
can't access root pts/21 tmux(1804832).%17
can't access root pts/22 tmux(1804832).%18
can't access root pts/23 tmux(1804832).%19
can't access root pts/24 tmux(1804832).%20
can't access root pts/25 tmux(1804832).%22
can't access root pts/27 tmux(1804832).%23
can't access root pts/28 tmux(1804832).%24
can't access root pts/29 tmux(1804832).%25
答案1
您有一个tmux
正在运行的会话,其中 root 用户已登录。
要查看您的tmux
会话,请运行:
tmux ls
这将为您提供包含一个或多个打开的会话的列表,如下所示:
$ tmux ls
session-name: 6 windows (created Tue Mar 12 08:47:53 2024)
要销毁会话,请运行以下命令:
tmux kill-session -t session-name
这将终止会话并删除所有登录到该会话的相关用户。
另一种选择是附加到您的tmux
会话并手动注销所有用户 - 但从您的问题来看,您似乎想完全关闭会话。