Mac : Change the hostname
Changing the hostname can be done through the GUI or console. Go to System Preferences > Sharing. On top of the window, click on Edit to change the computer name. The command line for the console is the following : sudo scutil –set HostName “your_hostname”