Tuesday, December 18, 2007

Permanently setting a hostname in OS X

OS X tries to be smart and determine the system's hostname from DHCP or reverse DNS lookups. This is well and good, except it breaks apps that rely on hostnames, changes the terminal prompt, and also changes the computer's Samba name.

The correct way to change the hostname seems to be using the scutil command, as suggested by this page which points to this forum post.

The command is:
sudo scutil --set HostName tarsier.domain.com

No comments: