next up previous contents index
Next: 5.3.2.4 /etc/networks Up: 5.3.2 Configuring TCP/IP on Previous: 5.3.2.2 The networking rc

5.3.2.3 /etc/hosts

    /etc/hosts contains a list of IP addresses and the hostnames that they correspond to. In general, /etc/hosts only contains entries for your local machine, and perhaps other ``important'' machines (such as your nameserver or gateway). Your local name server will provide address-to-name mappings for other machines on the network, transparently.

For example, if your machine is loomer.vpizza.com with the IP address 128.253.154.32, your /etc/hosts would look like:

127.0.0.1               localhost
128.253.154.32          loomer.vpizza.com loomer

If you're only using loopback, the only line in /etc/hosts should be for 127.0.0.1, with both localhost and your hostname after it.



next up previous contents index
Next: 5.3.2.4 /etc/networks Up: 5.3.2 Configuring TCP/IP on Previous: 5.3.2.2 The networking rc



Matt Welsh
mdw@sunsite.unc.edu