Environment variables specific to Blender? Do they exist? Are there any global variables in Blender? I was searching for them in Blender docs, but didn't find anything.

For example, I want to override the default /tmp directory with another directory. But I want to do it by overriding the environment variable.

For example Nuke has NUKE_TEMP_DIR variable, which I can simply override with a new value, and every time I start Nuke the temp directory will be as in the variable.

Houdini also has this kind of variables, Maya and so on.

What about Blender?
Environment Variables:
  $BLENDER_USER_CONFIG      Directory for user configuration files.
  $BLENDER_USER_SCRIPTS     Directory for user scripts.
  $BLENDER_SYSTEM_SCRIPTS   Directory for system wide scripts.
  $BLENDER_USER_DATAFILES   Directory for user data files (icons, translations, ..).
  $BLENDER_SYSTEM_DATAFILES Directory for system wide data files.
  $BLENDER_SYSTEM_PYTHON    Directory for system python libraries.
  $TMP or $TMPDIR           Store temporary files here.
  $SDL_AUDIODRIVER          LibSDL audio driver - alsa, esd, dma.
  $PYTHONHOME               Path to the python directory, eg. /usr/lib/python.


But the best way is to modify your prefs (File->path) as said above.