Pergunta

This may be a bit of an open ended question, and truth be told I would prefer an exhaustive list, however, this has been bugging me for a while: When is it ok for me to assume a program will use the hostnames specified in /etc/hosts?

Will any of these programs use it?

  • ssh (via ~/.ssh/config) YES
  • dhcp (via /etc/dhcp/dhcpd.conf) YES
  • iptables ?
Foi útil?

Solução

Every program which needs to map between URL and IP address (gethostbyname and such) will use /etc/hosts and DNS. The order is configurable via nsswitch.conf.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top