I have had a tmux session running for a while, and I can see it's running using pstree:

        ├─tmux: server─┬─bash───find_cli
        │              └─3*[bash]

(it's down the bottom there)

However, tmux itself insists there are no sessions:

$ tmux attach
no sessions
$ tmux ls
no server running on /tmp/tmux-1000/default

Is there any way to recover a tmux session in this situation?

  • 1
    Is it actually running as the current user, or as some other user?
    – Kusalananda
    Apr 25, 2020 at 12:13
  • Or with a non-default socket. See man 1 tmux, options -L and -S. Can it be the case? On the other hand, if you started a server in a non-default way, you would probably know. Apr 25, 2020 at 12:31
  • Looks like that tmux is being run by another user on the system. See if any other user is logged into the system. use w
    – GMaster
    Apr 25, 2020 at 13:52
  • @GMaster They might have started tmux as root, disconnected from it, and forgotten about it.
    – Kusalananda
    Apr 25, 2020 at 18:00
  • Yes it must be running as me (ubuntu), because ps -aux returns ubuntu 23508 0.8 0.0 19116 7696 ? Ss Mar02 673:09 tmux
    – Migwell
    Apr 26, 2020 at 14:00

1 Answer 1


If the socket has been removed you should be able to make tmux recreate it with pkill -USR1 tmux.

  • 1
    I still have a process running under that tmux session which I can't afford to cancel. Will this affect the child process?
    – Migwell
    Apr 26, 2020 at 14:01
  • 1
    It shouldn't do. Apr 26, 2020 at 15:12
  • 1
    I don't know why this works, but it does. I was able to tmux attach immediately after running that command.
    – Migwell
    Apr 27, 2020 at 4:23
  • Something removed your tmux socket in /tmp and sending this signal to the tmux server asks it to create it again. Apr 27, 2020 at 5:46
  • 1
    I can confirm I had exactly the same issue and this solution worked without killing the running processes Jun 3, 2021 at 19:14

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.