xref: /original-bsd/share/man/man5/hosts.5 (revision 95ecee29)
1.\" Copyright (c) 1983, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.roff%
5.\"
6.\"     @(#)hosts.5	8.2 (Berkeley) 12/11/93
7.\"
8.Dd
9.Dt HOSTS 5
10.Os BSD 4.2
11.Sh NAME
12.Nm hosts
13.Nd host name data base
14.Sh DESCRIPTION
15The
16.Nm hosts
17file contains information regarding
18the known hosts on the network.
19For each host a single line should be present
20with the following information:
21.Bd -unfilled -offset indent
22official host name
23Internet address
24aliases
25.Ed
26.Pp
27Items are separated by any number of blanks and/or
28tab characters.  A ``#'' indicates the beginning of
29a comment; characters up to the end of the line are
30not interpreted by routines which search the file.
31.Pp
32When using the name server
33.Xr named 8 ,
34this file provides a backup when the name server
35is not running.
36For the name server, it is suggested that only a few addresses
37be included in this file.
38These include  address for the local interfaces that
39.Xr ifconfig 8
40needs at boot time and a few machines on the local network.
41.Pp
42This file may be created from the official host
43data base maintained at the Network Information Control
44Center
45.Pq Tn NIC ,
46though local changes may be required
47to bring it up to date regarding unofficial aliases
48and/or unknown hosts.  As the data base maintained at
49.Tn NIC
50is incomplete, use of the name server is recommended for
51sites on the
52.Tn DARPA
53Internet.
54.Pp
55Network addresses are specified in the conventional
56``.'' (dot) notation using the
57.Xr inet_addr 3
58routine
59from the Internet address manipulation library,
60.Xr inet 3 .
61Host names may contain any printable
62character other than a field delimiter, newline,
63or comment character.
64.Sh FILES
65.Bl -tag -width /etc/hosts -compact
66.It Pa /etc/hosts
67The
68.Nm hosts
69file resides in
70.Pa /etc .
71.El
72.Sh SEE ALSO
73.Xr gethostbyname 3 ,
74.Xr ifconfig 8 ,
75.Xr named 8
76.Rs
77.%T "Name Server Operations Guide for BIND"
78.Re
79.Sh HISTORY
80The
81.Nm
82file format appeared in
83.Bx 4.2 .
84