Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Ubuntu or *nix systems is there a convention to store Unix Domain Socket files in a specific directory? I've seen applications store it in /tmp, but I thought /tmp can get periodically cleared, no?

share|improve this question

None other than the application creating a file in /tmp should remove the file. It's is somewhat common to offer the option to clear /tmp on boot, but this must be enabled by the administrator.

My distro will usually put sockets as well as pidfiles in /var/run/appname.

For reference:
Gentoo Development Guide: Filesystem
Filesystem Hierarchy Standard
FreeBSD direcotry structure

None of these tell you where to put sockets, but they all point to /var as a general purpose folder for stuff created by processes at runtime.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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