BSD 4_4 development
[unix-history] / .ref-6294d633e80db8e89697db796e6f6025d5af0cae / usr / src / share / man / man5 / hosts.5
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" %sccs.include.redist.roff%
.\"
.\" @(#)hosts.5 8.1 (Berkeley) %G%
.\"
.Dd
.Dt HOSTS 5
.Os BSD 4.2
.Sh NAME
.Nm hosts
.Nd host name data base
.Sh DESCRIPTION
The
.Nm hosts
file contains information regarding
the known hosts on the network.
For each host a single line should be present
with the following information:
.Bd -unfilled -offset indent
official host name
Internet address
aliases
.Ed
.Pp
Items are separated by any number of blanks and/or
tab characters. A ``#'' indicates the beginning of
a comment; characters up to the end of the line are
not interpreted by routines which search the file.
.Pp
When using the name server
.Xr named 8 ,
this file provides a backup when the name server
is not running.
For the name server, it is suggested that only a few addresses
be included in this file.
These include address for the local interfaces that
.Xr ifconfig 8
needs at boot time and a few machines on the local network.
.Pp
This file may be created from the official host
data base maintained at the Network Information Control
Center
.Pq Tn NIC ,
though local changes may be required
to bring it up to date regarding unofficial aliases
and/or unknown hosts. As the data base maintained at
.Tn NIC
is incomplete, use of the name server is recommend for
sites on the
.Tn DARPA
Internet.
.Pp
Network addresses are specified in the conventional
``.'' (dot) notation using the
.Xr inet_addr 3
routine
from the Internet address manipulation library,
.Xr inet 3 .
Host names may contain any printable
character other than a field delimiter, newline,
or comment character.
.Sh FILES
.Bl -tag -width /etc/hosts -compact
.It Pa /etc/hosts
The
.Nm hosts
file resides in
.Pa /etc .
.El
.Sh SEE ALSO
.Xr gethostbyname 3 ,
.Xr ifconfig 8 ,
.Xr named 8
.Rs
.%T "Name Server Operations Guide for BIND"
.Re
.Sh HISTORY
The
.Nm
file format appeared in
.Bx 4.2 .