I symlinked /tmp to a second hard drive (the root partition is on an SSD and I want to avoid wear).

Ever since then, it doesn't get emptied on a reboot. Any idea why? I use Ubuntu 14.10.


/tmp is typically mounted as a RAM-disk, so it resets whenever you reboot the machine. When you symlinked it to a location on a harddrive, the RAM-disk can no longer be mounted at /tmp (because the symlink already exists at that path), so everything written to /tmp is stored on your hard drive. You really should just remove the symlink and let the RAM-disk mount.

  • /tmp is not mentioned in fstab, doesn't that mean it's part of the normal filesystem? – spraff Jan 22 '15 at 7:29

Using a bind mount works.

/etc/fstab contains

/path/to/tmp /tmp none bind 0 0

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.