$ mkdir -p $HOME/tmp $ echo "export TMPDIR=$HOME/tmp" >> ~/.bashrc $ source ~/.bashrc 上述的$HOME/tmp可以自己指定