views:

63

answers:

3

Currently its /tmp

How can I set it to /anythingelse so that all applications use that subsequently?

+1  A: 

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.

Ignacio Vazquez-Abrams
+1  A: 
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.

Matt Joiner
This does not change it from `/tmp`. This merely changes where `/tmp` points.
Ignacio Vazquez-Abrams
The clue is in "all applications subsequently". It doesn't get sweeter.
Matt Joiner
A: 

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.

David Gelhar