Operating systems1 min readWikipedia, updated 30 March 2026
TMPDIR
UNIX environment variable
TMPDIR is the canonical environment variable in Unix and POSIX that should be used to specify a temporary directory for scratch space. Most Unix programs will honor this setting and use its value to denote the scratch area for temporary files instead of the common default of /tmp or /var/tmp.
Other forms sometimes accepted are TEMP, TEMPDIR and TMP, but these alternatives are used more commonly by non-POSIX operating systems or non-conformant programs.
TMPDIR is specified in various Unix and similar standards, e.g. per the Single UNIX Specification.
Adapted from the Wikipedia article, CC BY-SA 4.0. Continue on Wikipedia
Go deeper
Ideas this article links to.
- Unix filesystemDirectory structure used by a Unix-like operating system
- UnixOperating system
- Linux FoundationNon-profit technology consortium to develop the Linux operating system
- Operating systemSoftware that manages computer hardware resources
- Filesystem Hierarchy StandardLinux standard for directory structure