Every time I detach from all the tmux sessions in the terminal, after I want to get back, I get this:

[me@CentOS7 ~]$ tmux ls
error connecting to /tmp/tmux-1000/default (No such file or directory)

It seems the /tmp directory get cleared in the meantime. It doesn't happen straight away and it's hard to tell when exactly but usually after a couple of days of running I know I can't detach in order not to lose the session.

Anyone knows how to retain the session? Prevent CentOS from removing the tmux server somehow? (I assume it's CentOS as it never happened to me on Debian-based distros.)


You can attempt to send a SIGUSR1 to the process in order for the tmux server to recreate the socket

pkill -USR1 tmux


  • 1
    Missed that one, thanks. Any idea why this happens on CentOS? – qwrtln Apr 9 '18 at 6:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.