The common environment variable is HOME. Be aware that once you start changing the value of this variable things like

cd ~
won't work.

You can see the current value by

    echo $HOME

And can set an environment variable value by (in this case, I'm storing the existing value of HOME in another variable so I can access it later if needed):

    export OLDHOME=$HOME

You can change the value of home for a single command by doing something like:


Last Modified: March 15, 2011 - Benjamin A. KupermanVI Powered