Managing Hostnames and IP Addresses

Mac OS X 10.1 (and earlier versions of Mac OS X) only consulted /etc/hosts in single-user mode and stored hostname/IP address mappings in the /machines portion of the NetInfo database. As of Mac OS X 10.2, you can use the /etc/hosts file to map hostnames to IP addresses. For example, the following entry would map the hostname xyzzy to 192.168.0.1:

192.168.0.1   xyzzy

Get Mac OS X for Unix Geeks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.