Is there any difference between
/run directory and
var/run directory. It seems the latter is a link to the former. If the contents are one and the same what is the need for two directories?
From the Wikipedia page on the Filesystem Hierarchy Standard:
Modern Linux distributions include a /run directory as a temporary filesystem (tmpfs) which stores volatile runtime data, following the FHS version 3.0. According to the FHS version 2.3, this data should be stored in /var/run but this was a problem in some cases because this directory isn't always available at early boot. As a result, these programs have had to resort to trickery, such as using /dev/.udev, /dev/.mdadm, /dev/.systemd or /dev/.mount directories, even though the device directory isn't intended for such data. Among other advantages, this makes the system easier to use normally with the root filesystem mounted read-only.
So if you have already made a temporary filesystem for
/var/run to it would be the next logical step (as opposed to keeping the files on disk or creating a separate
Some utilities traditionally used
/run to store their process related material. When these were real on disc directories it did not matter too much that these were separate directories.
/run/ is often implemented as a
mount | fgrep run ) and data in those directories won't survive a reboot (which is a good thing). It makes a little more sense to map these together using a symbolic link, and save a mount, especially as the permissions and settings for these directories would be the same anyway (in contrast to some other "directories" that are on