Table of Contents
What `/tmp` Is For
/tmp is a special directory intended for temporary files:
- Used by applications, installers, and sometimes by users for short‑lived data.
- Files here are not meant to be permanent.
- Often cleaned automatically, either:
- at boot, or
- after files have been unused for some time.
Typical things that end up in /tmp:
- Temporary downloads
- Editor swap files (e.g., when editing documents)
- Application caches that don’t need to survive a reboot
- Temporary sockets and pipes used by programs
You can think of /tmp as a shared scratchpad for the whole system.
Characteristics of `/tmp`
While the exact behavior can vary by distribution, /tmp usually has these properties:
- World-writable: any user can create files there.
- Restricted deletion: users can only remove their own files.
- Temporary lifetime: files can disappear without warning.
You can inspect its permissions with: