Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I haven't put much thought into this until now, but it seems odd that there is a /var/tmp and /tmp directories for most of the linux distro's I routinely use ( Ubuntu, Centos, Redhat ).

Is there any semantic difference between the two, like when whoever designed the first file system layout, he or she thought "Not all tmp file's are created equal!"

The only difference I've found for centos, is that /tmp routinely scrubs out files older then 240 hours while /var/tmp holds onto stale files for 720 hours.

share|improve this question
Here is a similar question on Unix & Linux: What is the difference between /tmp and /var/tmp? – pabouk Nov 11 '13 at 7:13
up vote 20 down vote accepted

The main difference between both, is that /tmp is wiped whenever the system reboots where as /var/tmp gets preserved across reboots.

You'll be able to find further information regarding linux standard directory structures at the following link :

share|improve this answer

Historically, /tmp was an in-memory-only filesystem, meaning its contents were destroyed by a reboot. /var/tmp was in a real file system, meaning its contents could survive a reboot.

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.