From aldeid
Jump to: navigation, search
You might also see: host and hostname


This page describes /etc/hosts file. This file indicates a list of hosts on a network and enables to define aliasses. Most of the time, and especially in big networks, BIND is used instead of this file. Although, this file can be used for initializing a network.


  • Each line must be formatted as follows:
IP_address     hostname     [alias_1,[alias_2,[alias_n]]]
  • Separator is one or more spaces/tabulations.
  • Each line beginning with # is a comment
  • A hostname can only contain alphanumeric characters, "-" and "." and must end with an alphanumerical character.


# localhost definitions     localhost     aldlin1

# The following lines are desirable for IPv6 capable hosts
::1           localhost ip6-localhost ip6-loopback
fe00::0       ip6-localnet
ff00::0       ip6-mcastprefix
ff02::1       ip6-allnodes
ff02::2       ip6-allrouters
ff02::3       ip6-allhosts