Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

hosts(4) [osf1 man page]

hosts(4)						     Kernel Interfaces Manual							  hosts(4)

NAME
hosts - The host name data base SYNOPSIS
/etc/hosts DESCRIPTION
The hosts file contains information regarding the known hosts on the network. For each host a single line should be present with the fol- lowing information: IP_address canonical_hostname aliases Items are separated by any number of blanks and/or tab characters. The # (number sign) indicates the beginning of a comment; characters up to the end of the line are not interpreted by routines which search the file. When using the name server named(8), this file provides a backup when the name server is not running. For the name server, it is suggested that only a few addresses be included in this file. These include address for the local interfaces that ifconfig(8) needs at boot time and a few machines on the local network. This file may be created from the official host data base maintained at the Network Information Control Center (NIC), though local changes may be required to bring it up to date regarding unofficial aliases and/or unknown hosts. As the data base maintained at NIC is incom- plete, use of the name server is recommend for sites on the DARPA Internet. Network addresses are specified in the conventional . notation using the inet_addr() routine from the Internet address manipulation library, inet_addr(3). Host names may contain any printable character other than a field delimiter, newline, or comment character. RELATED INFORMATION
Commands: ifconfig(8), named(8) Functions: gethostbyname(3) delim off hosts(4)

Check Out this Related Man Page

hosts(4)						     Kernel Interfaces Manual							  hosts(4)

NAME
hosts - host name data base DESCRIPTION
The file associates Internet (IP) addresses with official host names and aliases. This allows a user to refer to a host by a symbolic name instead of an Internet address. This file contain all addresses for local interfaces that needs at boot time (see ifconfig(1M)). When using the name server (see named(1M)), or Network Information Service (see ypserv(1M)), this file often serves as a backup when the server is not running. In such circumstances, it is a common practice for to contain a few addresses of machines on the local network. should contain a single line for each host with the following information: internet_address official_host_name aliases The internet_address can be an IPv4 or IPv6 address specified in the conventional Internet dot notation. See inet(3N) or inet6(3N) for more information on Internet address manipulation routines. aliases are other names by which a host is known. They can substitute for the official_host_name in most commands. For example: In this example, users can use remote login on by using the command: instead of If your system is in a domain naming environment, an official host name consists of the full domain extended host name. For example: (space or tab character). Items are separated by any number or combination of space or tab characters (blanks). A character indicates the beginning of a comment. Characters from the to the end of the line are not interpreted by routines that search the file. Trailing blanks are allowed at the end of a line. For the Internet, this file is normally created from the official host database maintained at the Network Information Control Center (NIC), although local changes may be required to bring it up to date with respect to unofficial aliases and/or unknown hosts. Host names can contain any printable character other than a white space, newline, or comment character. EXAMPLES
See AUTHOR
was developed by the University of California, Berkeley. SEE ALSO
gethostent(3N), inet(3N), nsswitch.conf(4). hosts(4)
Man Page