BSD 4_4 development
[unix-history] / .ref-6294d633e80db8e89697db796e6f6025d5af0cae / usr / src / share / man / man5 / hosts.5
CommitLineData
517c4acb
KB
1.\" Copyright (c) 1983, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
43624042 3.\"
eadcc84a 4.\" %sccs.include.redist.roff%
954133cd 5.\"
517c4acb 6.\" @(#)hosts.5 8.1 (Berkeley) %G%
43624042 7.\"
eadcc84a
CL
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
43624042 15The
eadcc84a 16.Nm hosts
43624042 17file contains information regarding
df1ff6ff 18the known hosts on the network.
43624042
KM
19For each host a single line should be present
20with the following information:
eadcc84a 21.Bd -unfilled -offset indent
43624042 22official host name
43624042 23Internet address
43624042 24aliases
eadcc84a
CL
25.Ed
26.Pp
43624042
KM
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.
eadcc84a 31.Pp
df1ff6ff 32When using the name server
eadcc84a 33.Xr named 8 ,
df1ff6ff
JB
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
eadcc84a 39.Xr ifconfig 8
df1ff6ff 40needs at boot time and a few machines on the local network.
eadcc84a 41.Pp
df1ff6ff 42This file may be created from the official host
43624042 43data base maintained at the Network Information Control
eadcc84a
CL
44Center
45.Pq Tn NIC ,
46though local changes may be required
43624042 47to bring it up to date regarding unofficial aliases
eadcc84a
CL
48and/or unknown hosts. As the data base maintained at
49.Tn NIC
df1ff6ff 50is incomplete, use of the name server is recommend for
eadcc84a
CL
51sites on the
52.Tn DARPA
53Internet.
54.Pp
43624042 55Network addresses are specified in the conventional
eadcc84a
CL
56``.'' (dot) notation using the
57.Xr inet_addr 3
58routine
43624042 59from the Internet address manipulation library,
eadcc84a 60.Xr inet 3 .
43624042
KM
61Host names may contain any printable
62character other than a field delimiter, newline,
63or comment character.
eadcc84a
CL
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 .