Commit | Line | Data |
---|---|---|
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 | 15 | The |
eadcc84a | 16 | .Nm hosts |
43624042 | 17 | file contains information regarding |
df1ff6ff | 18 | the known hosts on the network. |
43624042 KM |
19 | For each host a single line should be present |
20 | with the following information: | |
eadcc84a | 21 | .Bd -unfilled -offset indent |
43624042 | 22 | official host name |
43624042 | 23 | Internet address |
43624042 | 24 | aliases |
eadcc84a CL |
25 | .Ed |
26 | .Pp | |
43624042 KM |
27 | Items are separated by any number of blanks and/or |
28 | tab characters. A ``#'' indicates the beginning of | |
29 | a comment; characters up to the end of the line are | |
30 | not interpreted by routines which search the file. | |
eadcc84a | 31 | .Pp |
df1ff6ff | 32 | When using the name server |
eadcc84a | 33 | .Xr named 8 , |
df1ff6ff JB |
34 | this file provides a backup when the name server |
35 | is not running. | |
36 | For the name server, it is suggested that only a few addresses | |
37 | be included in this file. | |
38 | These include address for the local interfaces that | |
eadcc84a | 39 | .Xr ifconfig 8 |
df1ff6ff | 40 | needs at boot time and a few machines on the local network. |
eadcc84a | 41 | .Pp |
df1ff6ff | 42 | This file may be created from the official host |
43624042 | 43 | data base maintained at the Network Information Control |
eadcc84a CL |
44 | Center |
45 | .Pq Tn NIC , | |
46 | though local changes may be required | |
43624042 | 47 | to bring it up to date regarding unofficial aliases |
eadcc84a CL |
48 | and/or unknown hosts. As the data base maintained at |
49 | .Tn NIC | |
df1ff6ff | 50 | is incomplete, use of the name server is recommend for |
eadcc84a CL |
51 | sites on the |
52 | .Tn DARPA | |
53 | Internet. | |
54 | .Pp | |
43624042 | 55 | Network addresses are specified in the conventional |
eadcc84a CL |
56 | ``.'' (dot) notation using the |
57 | .Xr inet_addr 3 | |
58 | routine | |
43624042 | 59 | from the Internet address manipulation library, |
eadcc84a | 60 | .Xr inet 3 . |
43624042 KM |
61 | Host names may contain any printable |
62 | character other than a field delimiter, newline, | |
63 | or comment character. | |
eadcc84a CL |
64 | .Sh FILES |
65 | .Bl -tag -width /etc/hosts -compact | |
66 | .It Pa /etc/hosts | |
67 | The | |
68 | .Nm hosts | |
69 | file 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 | |
80 | The | |
81 | .Nm | |
82 | file format appeared in | |
83 | .Bx 4.2 . |