Last Updated: February 25, 2016
·
1.47K
· kenergy

Quick Tip: scutil

Type the following command to change the primary hostname of your Mac:
This is your fully qualified hostname, for example myMac.domain.com <br>
<i>sudo scutil –set HostName <new host name></i>

Type the following command to change the Bonjour hostname of your Mac:
This is the name usable on the local network, for example myMac.local.<br>
<i>sudo scutil –set LocalHostName <new host name></i>

Optional: If you also want to change the computer name, type the following command:
This is the user-friendly computer name you see in Finder, for example myMac.<br>
<i>sudo scutil –set ComputerName <new name></i>

Flush the DNS cache by typing:<br>
<i>dscacheutil -flushcache</i>

Restart your Mac<br>
<i>sudo reboot -n</i>