Changing the $HOME environment variable in terminal on mac 10.8 To be clear im not looking for a workaround that will execute a change directory command on startup. I want to alter the $HOME env var so that tilde commands work and so that entering a 'cd' command will return me to that directory.

I am sure it is possible I am just not able to find the command.

I have tried setting it in my /etc/profile but it doesnt seem to work. I have tried about 4 different settings in there. The ones I can remember trying are:

$HOME = /directroy
$HOME = "/directroy"
setenv HOME /directory


I may be missing something simple but I'm unable to find a solution.
In bash (the default shell of Terminal on 10.8) the syntax:

HOME=/your/path
export HOME