*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> hosts (4)              
Title
Content
Arch
Section
 

hosts(4)

Contents


NAME    [Toc]    [Back]

       hosts - The host name data base

SYNOPSIS    [Toc]    [Back]

       /etc/hosts

DESCRIPTION    [Toc]    [Back]

       The  hosts  file  contains information regarding the known
       hosts on the network.  For each host a single line  should
       be  present  with  the  following  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.

       The following is an example of an /etc/hosts file:

       127.0.0.1           localhost   192.168.201.38      esterbrook.stylos.plume.net
   esterbrook este es  192.168.201.3
       wirt.stylos.plume.net           wirt       #   DNS  server
       192.168.201.6     eclipse.stylos.plume.net      eclipse  #
       DNS   server   192.168.112.155     carter.stylos.plume.net
       carter    #  NIS  server  192.168.112.163     chilton.stylos.plume.net
      chilton  # NIS server

       The   first  two  or  more  entries  include  the  default
       127.0.0.1 loopback interface and any local network  interfaces
  that  the ifconfig command needs when you boot your
       system.  In this case,  there  is  one  (primary)  network
       interface  on  the local system.  It is called esterbrook,
       but because it has such a long name, users  on  the  local
       system  can refer to it by the aliases este or es for convenience.


       The remaining entries are for other hosts in your network.
       If you are not running a naming service, such as BIND, you
       need to add an entry for any  system  to  which  you  will
       refer  by  a  host name.  If you are running a naming service,
 you need only add entries for the most critical systems
  with  which you will communicate.  In the event that
       the naming service fails, the hosts file will serve  as  a
       backup.

       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 incomplete, 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.



SEE ALSO    [Toc]    [Back]

      
      
       Commands: ifconfig(8), named(8)

       Functions: gethostbyname(3)



                                                         hosts(4)
[ Back ]
 Similar pages
Name OS Title
hosts HP-UX host name data base
hosts FreeBSD host name data base
rhosts FreeBSD trusted remote host and user name data base
hosts.equiv FreeBSD trusted remote host and user name data base
phones FreeBSD remote host phone number data base
networks HP-UX network name data base
services FreeBSD service name data base
dbm IRIX data base subroutines
ndbm IRIX data base subroutines
protocols FreeBSD protocol name data base
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service