Setting Hostname on Mac OS X 10.5
So if you are a road warrior and travel around a lot. You may be annoyed by your terminal displaying your DHCP hostname rather than the real hostname of your machine. That being said here is a simple way to permanently fix your problem.
sudo scutil --set HostName
Enjoy!