2

Due to a network problem, my iMac was renamed Theater-ATV-8.localname. This is the name that appears when the Terminal hostname name is run.

Nothing I have tried will change this name permanently. I can change it with hostname [new name], but it reverts on reboot.

The name in the Sharing pane in System Preferences if KW-desk-iMAC.

2 Answers 2

2

The man page for hostname says:

To keep the hostname between reboots, run `scutil --set HostName name-of-host'.

Also, the name in the Sharing prefs pane you mentioned, is that the name that isvisible right there when you open the pane, or the one you can edit when you click the "Edit..." (or similar - in German it's "Bearbeiten...") button?

2

Use scutil to set all three of the names that can exist for a macOS system.

Setting hostname via scutil

you can experiment with using a different name for each and figure which bonjour uses, which is the formal name and which maps to hostname if the manual page isn’t clear.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .