Currently its /tmp
How can I set it to /anythingelse so that all applications use that subsequently?
Currently its /tmp
How can I set it to /anythingelse so that all applications use that subsequently?
Specific applications may have configuration options or environment variables for this, but in general *nix systems are supposed to use /tmp
for temporary files, and this cannot be changed.
sudo rmdir /tmp && ln -s /some/other/loc /tmp
Alternatively, set the environment variable TMPDIR
at the highest level possible. For the environment, or per user.
You can, if you really insist, make /tmp
be a symbolic link to whatever location you want (Matt Joiner's answer gives the specific command to do that).
For example, on Mac OS, /tmp
is a symlink to /private/tmp
. This arrangement can be used to facilitate the ability to NFS-mount /
(presumably read-only) while keeping system-specific files that can't be shared (/etc, /tmp, and so forth) in a /private
partition on a local disk.