My GNU screen stores its sessions in the /tmp directory.

That means that after a reboot, all sessions are lost:

$ screen -list 
No Sockets found in /tmp/uscreens/S-dehmann.

How can I tell it to store them in a specific directory in my home directory, where they won't be lost so easily?

  • 2
    What good are the sockets after a reboot? The controlling SCREEN process, and all its children will have been terminated.
    – neirbowj
    Aug 19, 2013 at 16:43

1 Answer 1


From the manual:

The "socket directory" defaults either to $HOME/.screen or simply to
/tmp/screens or preferably to /var/run/screen chosen at  compile-time...

By setting the environment variable SCREENDIR you can change the default behavior.

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.