Setting the hostname on your Mac using scuttle
- Open a terminal.
- Type the following command to change the primary hostname of your Mac:
sudo scutil –set HostName <new host name> - Type the following command to change the Bonjour hostname of your Mac:
sudo scutil –set LocalHostName <new host name> - Optional: If you also want to change the computer name, type the following command:
sudo scutil –set ComputerName <new name>
Like this: sudo scutil --get HostName sudo scutil --get LocalHostName sudo scutil --get ComputerName