Skip to main content
added 99 characters in body
Source Link
dr_
  • 32.4k
  • 22
  • 102
  • 148

/etc/hosts does not use DNS at all so talking about DNS cache makes no sense. This file is authoritative over DNS concerning name resolution, as specified in /etc/nsswitch.conf (the Name Service Switch config file).

So if you enter a IP-host mapping in /etc/hosts it will always take precedence over DNS. (Of course, unless you modified /etc/nsswitch.conf, and you should have a good reason to do so.)

/etc/hosts does not use DNS at all so talking about DNS cache makes no sense. This file is authoritative over DNS concerning name resolution, as specified in /etc/nsswitch.conf (the Name Service Switch config file).

So if you enter a IP-host mapping in /etc/hosts it will always take precedence over DNS.

/etc/hosts does not use DNS at all so talking about DNS cache makes no sense. This file is authoritative over DNS concerning name resolution, as specified in /etc/nsswitch.conf (the Name Service Switch config file).

So if you enter a IP-host mapping in /etc/hosts it will always take precedence over DNS. (Of course, unless you modified /etc/nsswitch.conf, and you should have a good reason to do so.)

Source Link
dr_
  • 32.4k
  • 22
  • 102
  • 148

/etc/hosts does not use DNS at all so talking about DNS cache makes no sense. This file is authoritative over DNS concerning name resolution, as specified in /etc/nsswitch.conf (the Name Service Switch config file).

So if you enter a IP-host mapping in /etc/hosts it will always take precedence over DNS.