在 Debian 上,我通过 ssh 访问,然后打开一个新的 tmux 会话,将其分离,我在命令中看到它们who
。注意:两个示例中每个服务器都有 2 个 SSH 连接。Ubuntu 是 Ubuntu Server 20.04。
who
debian pts/0 2021-03-27 23:18 (192.168.178.5)
debian pts/1 2021-03-27 23:23 (192.168.178.5)
debian pts/2 2021-03-27 23:27 (tmux(4298).%0)
debian pts/6 2021-03-27 23:47 (tmux(4298).%4)
tmux list-sessions
0: 1 windows (created Sat Mar 27 23:27:35 2021) [166x54]
4: 1 windows (created Sat Mar 27 23:47:36 2021) [166x54]
在 Ubuntu 上:
who
ubuntu pts/0 2021-03-31 00:01 (192.168.178.5)
ubuntu pts/2 2021-03-31 00:43 (192.168.178.5)
tmux list-sessions
0: 1 windows (created Tue Mar 30 18:01:15 2021)
1: 1 windows (created Tue Mar 30 18:29:29 2021)
2: 1 windows (created Tue Mar 30 18:51:09 2021)
3: 1 windows (created Tue Mar 30 19:18:59 2021)
4: 1 windows (created Tue Mar 30 19:20:08 2021)
5: 1 windows (created Tue Mar 30 19:20:38 2021)
答案1
这是 Ubuntu 20.04 中的意外行为和错误,其他 Ubuntu 版本(甚至 Ubuntu 20.10)中不存在该错误。错误报告在此处:https://bugs.launchpad.net/ubuntu/+source/tmux/+bug/1890406
答案2
我建议升级到最新的 tmux 版本 - 这对我来说很有用,并且所有依赖项都正常。
对于 x86/64:
wget http://ftp.br.debian.org/debian/pool/main/t/tmux/tmux_3.1c-1_amd64.deb
sudo apt install ./tmux_3.1c-1_amd64.deb
对于 arm64:
wget http://ftp.br.debian.org/debian/pool/main/t/tmux/tmux_3.1c-1_arm64.deb
sudo apt install ./tmux_3.1c-1_arm64.deb