/tmp

The shared directory where any user or program can create temporary files, often cleared on reboot.

In more detail

Because every user can write there, /tmp has the sticky bit set: you can create files but cannot delete or rename other users' files. Its mode is 1777, the leading 1 being the sticky bit. Do not keep anything there you need after a reboot.

Examples

Because anyone can write there, attackers drop tools in /tmp or /var/tmp, often with hidden names starting with a dot.
In this course: Test tools put their scratch directories under the system temporary directory, which is /tmp on most Linux systems and a per-user folder on macOS. Never rely on a fixed name there in a test; ask for a private directory instead.

Related terms

Taught in

References

Certification courses