My second user "robert" cannot attach to a tmux session, even when I used sudo. I type: sudo tmux attach -t ruby and I get the output of no current session. If I type tmux ls, I get no server running on /tmp/tmux-1001/default.


I think you need to use tmux -S /tmp/tmux-1000/default attach -t ruby. The -S option directs the command to use the server socket created by the UID 1000 (pi) rather than look for server sockets for UID 1001 (robert).

  • Yes, that worked perfectly. I still had to use sudo, but I was able to attach. Thank you, that was great. – Robert Baker Jan 9 at 0:42

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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