sudo scutil --set HostName MYCOOLHOSTNAME
sudo scutil --set LocalHostName MYCOOLHOSTNAME
sudo scutil --set ComputerName MYCOOLHOSTNAME
dscacheutil -flushcache