1*49644Scael.\" Copyright (c) 1983, 1991 The Regents of the University of California. 236757Sbostic.\" All rights reserved. 320821Smckusick.\" 4*49644Scael.\" %sccs.include.redist.roff% 520821Smckusick.\" 6*49644Scael.\" @(#)hosts.5 6.6 (Berkeley) 05/10/91 736757Sbostic.\" 8*49644Scael.Dd 9*49644Scael.Dt HOSTS 5 10*49644Scael.Os BSD 4.2 11*49644Scael.Sh NAME 12*49644Scael.Nm hosts 13*49644Scael.Nd host name data base 14*49644Scael.Sh DESCRIPTION 1520821SmckusickThe 16*49644Scael.Nm hosts 1720821Smckusickfile contains information regarding 1828183Sbloomthe known hosts on the network. 1920821SmckusickFor each host a single line should be present 2020821Smckusickwith the following information: 21*49644Scael.Bd -unfilled -offset indent 2220821Smckusickofficial host name 2320821SmckusickInternet address 2420821Smckusickaliases 25*49644Scael.Ed 26*49644Scael.Pp 2720821SmckusickItems are separated by any number of blanks and/or 2820821Smckusicktab characters. A ``#'' indicates the beginning of 2920821Smckusicka comment; characters up to the end of the line are 3020821Smckusicknot interpreted by routines which search the file. 31*49644Scael.Pp 3228183SbloomWhen using the name server 33*49644Scael.Xr named 8 , 3428183Sbloomthis file provides a backup when the name server 3528183Sbloomis not running. 3628183SbloomFor the name server, it is suggested that only a few addresses 3728183Sbloombe included in this file. 3828183SbloomThese include address for the local interfaces that 39*49644Scael.Xr ifconfig 8 4028183Sbloomneeds at boot time and a few machines on the local network. 41*49644Scael.Pp 4228183SbloomThis file may be created from the official host 4320821Smckusickdata base maintained at the Network Information Control 44*49644ScaelCenter 45*49644Scael.Pq Tn NIC , 46*49644Scaelthough local changes may be required 4720821Smckusickto bring it up to date regarding unofficial aliases 48*49644Scaeland/or unknown hosts. As the data base maintained at 49*49644Scael.Tn NIC 5028183Sbloomis incomplete, use of the name server is recommend for 51*49644Scaelsites on the 52*49644Scael.Tn DARPA 53*49644ScaelInternet. 54*49644Scael.Pp 5520821SmckusickNetwork addresses are specified in the conventional 56*49644Scael``.'' (dot) notation using the 57*49644Scael.Xr inet_addr 3 58*49644Scaelroutine 5920821Smckusickfrom the Internet address manipulation library, 60*49644Scael.Xr inet 3 . 6120821SmckusickHost names may contain any printable 6220821Smckusickcharacter other than a field delimiter, newline, 6320821Smckusickor comment character. 64*49644Scael.Sh FILES 65*49644Scael.Bl -tag -width /etc/hosts -compact 66*49644Scael.It Pa /etc/hosts 67*49644ScaelThe 68*49644Scael.Nm hosts 69*49644Scaelfile resides in 70*49644Scael.Pa /etc . 71*49644Scael.El 72*49644Scael.Sh SEE ALSO 73*49644Scael.Xr gethostbyname 3 , 74*49644Scael.Xr ifconfig 8 , 75*49644Scael.Xr named 8 76*49644Scael.Rs 77*49644Scael.%T "Name Server Operations Guide for BIND" 78*49644Scael.Re 79*49644Scael.Sh HISTORY 80*49644ScaelThe 81*49644Scael.Nm 82*49644Scaelfile format appeared in 83*49644Scael.Bx 4.2 . 84