Mac : How do I change the hostname with terminal ?
Changing the default hostname and make it permanent is quite easy. You can go through preference panel or using the command line : scutil –set HostName HOST_NAME Once you’ve pressed enter, you’ll be prompted to enter the admin password.