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

SEE ALSO

46       gethostbyname(3), resolver(5), mailaddr(7), named(8)
47

COLOPHON

49       This  page  is  part of release 3.53 of the Linux man-pages project.  A
50       description of the project, and information about reporting  bugs,  can
51       be found at http://www.kernel.org/doc/man-pages/.
52
53
54
55Linux                             2010-11-07                       HOSTNAME(7)
Impressum