Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

hosts(4) OSS Shell and Utilities Reference Manual
NAME
hosts - Contains information about the hosts in the network
DESCRIPTION
The /etc/hosts le contains information about the hosts in the network. A host entry consists of a
host address in standard dot notation and the host name. The entry can optionally contain aliases
for the host name. Each entry takes the following form:
address name aliases
The elds contain the following information.
address The host address in standard dot notation.
name The name of the host.
aliases Any alias names for the host.
Fields are separated by one or more spaces or tab characters. Comments begin with the number
sign (#). Routines that search the hosts le do not interpret characters from the beginning of a
comment to the end of the line. A host name can contain any printable character except a eld
delimiter, newline character, or comment character (#).
EXAMPLES
Example lines from a hosts le are shown below:
131.253.124.22 toms #Tom Smith
155.187.223.67 granada #name server
FILES
/etc/hosts
RELATED INFORMATION
Files: networks(4), protocols(4), services(4).
Functions: endhostent(3), gethostbyaddr(3), gethostbyname(3), gethostent(3), sethostent(3).
116 Hewlett-Packard Company 527188-003