1HOSTNAME(7)                Linux Programmer's Manual               HOSTNAME(7)
2
3
4

NAME

6       hostname - hostname resolution description
7

DESCRIPTION

9       Hostnames  are domains, where a domain is a hierarchical, dot-separated
10       list of subdomains; for example, the machine  monet,  in  the  Berkeley
11       subdomain of the EDU subdomain of the Internet would be represented as
12
13           monet.Berkeley.EDU
14
15       (with no trailing dot).
16
17       Hostnames are often used with network client and server programs, which
18       must generally translate the name to an address for use.  (This task is
19       generally performed by either getaddrinfo(3) or the obsolete gethostby‐
20       name(3).)  Hostnames are resolved by the Internet name resolver in  the
21       following fashion.
22
23       If  the  name consists of a single component, that is, contains no dot,
24       and if the environment variable HOSTALIASES is set to  the  name  of  a
25       file, that file is searched for any string matching the input hostname.
26       The file should consist of lines made up of two  white-space  separated
27       strings,  the  first  of which is the hostname alias, and the second of
28       which is the complete hostname to be substituted for that alias.  If  a
29       case-insensitive match is found between the hostname to be resolved and
30       the first field of a line in the file, the substituted name  is  looked
31       up with no further processing.
32
33       If  the  input  name  ends  with  a  trailing  dot, the trailing dot is
34       removed, and the remaining name is looked up with no  further  process‐
35       ing.
36
37       If  the input name does not end with a trailing dot, it is looked up by
38       searching through a list of  domains  until  a  match  is  found.   The
39       default  search  list  includes first the local domain, then its parent
40       domains with at least 2 name components (longest first).  For  example,
41       in  the  domain CS.Berkeley.EDU, the name lithium.CChem will be checked
42       first as lithium.CChem.CS.Berkeley.EDU and then as lithium.CChem.Berke‐
43       ley.EDU.   Lithium.CChem.EDU  will  not  be tried, as there is only one
44       component remaining from the local domain.   The  search  path  can  be
45       changed  from  the  default  by  a  system-wide configuration file (see
46       resolver(5)).
47

SEE ALSO

49       gethostbyname(3), resolver(5), mailaddr(7), named(8)
50

COLOPHON

52       This page is part of release 3.22 of the Linux  man-pages  project.   A
53       description  of  the project, and information about reporting bugs, can
54       be found at http://www.kernel.org/doc/man-pages/.
55
56
57
58Linux                             2008-06-11                       HOSTNAME(7)
Impressum