.TH hosts "" "" "System Administration"
.PC "Names and addresses of hosts on the local network"
\fB/etc/hosts\fR
.PP
.II /etc/hosts
The file
.B /etc/hosts
gives the name and Internet-protocol (IP) address of remote hosts
with which your system can communicate via a network.
.PP
Each line within
.B hosts
describes one host on the network.
A description of a host begins with that host's IP address, in normal
``dot'' notation.
This is followed by its name and any aliases it has \(em that is,
other names that also refer to that host.
For example, consider the following:
.DM
	666.16.16.27	accounting	acct	beancounters
	666.16.16.2	president	boss
	666.16.3.5	engineering
.DE
.PP
As you can see, a given host can have more than one alias.
Aliases need not be terse; however, you should not use an alias name that
you would not want the users of that host to see.
.PP
An IP address can appear on more than one line.
For example, entry
.DM
	137.229.10.39	raven raven.alaska raven.alaska.edu
.DE
.PP
can also be rendered as:
.DM
	137.229.10.39	raven
	137.229.10.39	raven.alaska
	137.229.10.39	raven.alaska.edu
.DE
.PP
You may find this to be more legible.
However, if you need to change this host's IP address, you must be careful
to change every entry, or trouble will result.
.PP
.B /etc/hosts
must include the following standard entries:
.DM
.ta 0.5i 1.5i
	127.1	localhost
	127.0.0.1	loopback
.DE
.PP
When you specify only two parts of an Internet address, the
second part represents the final three bytes of that address.
Thus, the addresses
.B 127.1
and
.B 127.0.0.1
are, in fact, the same address.
.PP
The address
.B 127.1
by convention names the local host.
Packets sent to this address return to the local host:
they do not go onto the Ethernet.
This feature is useful in debugging software.
The host names
.B localhost
and
.B loopback
are also conventional names for your local host.
.PP
.B /etc/hosts
should also contain a separate entry
for your local host's Internet address and name.
You set the name for your system when you installed \*(CO.
To change your system's name, edit the file
.BR /etc/uucpname .
.SH "See Also"
.Xr "Adminstering COHERENT," administe
.Xr "hosts.equiv," hosts.equ
.Xr "inetd.conf," inetd.con
.Xr "networks," networks
.Xr "protocols," protocols
.Xr "services," services
.Xr "uucpname" uucpname
