hosts(4) TCP/IP 5.4.2 hosts(4)
NAME
hosts - hostname database
DESCRIPTION
The hosts file contains information about the known hosts on the
network. For each host, a single line should be present with the
following information:
Internetaddress hostname [ aliases ] [ # comment ]
Items are delimited by any number of blanks and/or tab characters. A
# character indicates the beginning of a comment; characters up to
the end of the line are not interpreted by routines that search the
file.
For ARPANET systems only: The hosts file is often created from the
official host database maintained at the DARPA Network Information
Center (NIC). However, local changes may be required to update the
file for unofficial aliases and/or unknown hosts.
Network addresses are specified in conventional dot notation for use
by the inetaddr routine from the Internet address manipulation
library, inet(3N).
A hostname can be a domain name or a single component of a domain
name; see hostname(5) for details. A component consists of up to 24
characters drawn from the lowercase alphabet (a-z), uppercase
alphabet (A-Z), digits (0-9), and minus sign (-). Periods are only
allowed when they serve to delimit components of domain names. No
blank or space characters are permitted as part of a component. No
distinction is made between upper and lower case. The first
character of a component must be an alphabetic character. The last
character can not be a minus sign or period. Single character names
or nicknames are not allowed.
If your system is using either the Network Information Service (NIS)
or the Domain Name System (DNS), host names and address mappings are
handled differently. For details on NIS, see Managing ONC
(Trademark)/NFS® and Its Facilities on the DG/UX (Trademark) System.
For details on DNS, see Managing TCP/IP on the DG/UX (Trademark)
System. The svcorder file determines how name/address resolution is
done on your system. See the svcorder(4) manual page for details.
EXAMPLES
85.0.0.31 hostB HOSTB #Comment
85.0.0.32 hostC HOSTC #Greg's Office
FILES
/etc/hosts
SEE ALSO
gethostent(3N), svcorder(4).
Licensed material--property of copyright holder(s) 1