Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want wget to use a global DNS cache, not just in memory for the current instance.

The wget manual mentions

Turn off caching of DNS lookups. Normally, Wget remembers the IP addresses it looked up from DNS so it doesn't have to repeatedly contact the DNS server for the same (typically small) set of hosts it retrieves from. This cache exists in memory only; a new Wget run will contact DNS again.

So I need a cache mechanism for wget. What do you recommend?

share|improve this question
up vote 3 down vote accepted

You could use any local DNS caching daemon like Dnsmasq or Bind in a caching-only configuration. Then the most recent responses will be cached locally and multiple instances of wget will not trigger extra queries over the network for the same names. Wget may be set to --no-dns-cache to save some memory at cost of performance.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.