Tmux failed to connect to server error on `tmux ls` when there are no running sessions

。_饼干妹妹 提交于 2019-12-05 19:11:56

Note that you may have a tmux server running, but you cannot connect to it because someone cleaned out the /tmp directory and took the server's socket with it.

In that case, you can tell the server to recreate the socket by sending it a SIGUSR1 signal.

% ps aux | grep -w [t]mux
root     14799  0.2  0.0  36020   488 ?        Ss   May08  51:30 tmux
% kill -USR1 14799
% tmux ls
<list of tmux sessions>

Using a combination of @Barmar and @Etan Reisner 's advice:

tmux ls 2> /dev/null

Nothing is echoed in when there are no sessions, otherwise the list is reported.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!