TMPDIR is the canonical environment variable in Unix and POSIX that should be used to specify a temporary directory for scratch space.
TMPDIR acts as the primary environment variable in Unix and POSIX environments, designed for setting up a temporary directory for scratch space.