tmux 会话恢复(no sessions)

今天如往日一样登录开发机开始新一天的coding ,(linux  下 vim 开发)

因有开发环境,staging 环境,数据库环境,redis 环境等等。。所以使用 tmux 进行管理。

输入 tmux :

 尼玛,我的session 呢。难道系统又把我的tmux 给杀掉了?

脑袋灵光一闪,昨天我把/tmp 目录给清理了,因为里面有太多辣鸡文件。可能和这个有关。

看了下我的tmux 进程:

 当时的session  还活着呢呀,不太懂了。

google  一把吧。

Sending an SIGUSR1 signal to the tmux process recreases the socket file, allowing you to reattach using tmux attach afterwards.

$ sudo kill -SIGUSR1 21711
$ tmux attach  

就可以了。具体的原因是: 

请看下面文章:

https://rubenvarela.com/guides/recovering-tmux-when-its-socket-was-deleted/

原文地址:https://www.cnblogs.com/shaoyu19900421/p/13158586.html