Apple by default set the hostname
of your machine in the <name>-<machine-type>
format. For example, it could be Myname-MacBook-Pro
. You can change the hostname both via System Preferences
and the Terminal
.
System Preferences
from the Apple menu
. Sharing
preferences by clicking on the Sharing
icon. Computer Name
field.
Terminal
via Spotlight
. hostname
via scutil
using sudo
. $ sudo scutil --set HostName newhostname
Comment anonymously. Login not required.