>_ IzzyLab

Topic breakdown

Before turning to DNS, the system looks at the local file /etc/hosts — a simple table of 'IP → names' mappings; an entry in it wins without any network (the order is set by the hosts: line in /etc/nsswitch.conf). Line format: the address first, then, separated by a space, one or more names; the loopback address 127.0.0.1 points to the machine itself. The mapping should be appended to the end of the file without overwriting existing lines. The result is checked with getent hosts, which queries the resolver the same way programs do.

What's checked

  1. api.local resolves to 127.0.0.1
  2. the localhost entry is intact

What it looks like