Mac terminal shows 'null' for host name at the prompt

I had the same problem too. Fixed it by following this trick


Have a look in your .bashrc and .bash_profile... for instance I have the line

PS1="\[\e[0;32m\]\u@monkey:\w\$ \[\e[0m\]"

before fi to set my prompt.