Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 just want to see how IP addresses mapped to domain names in my local machine. Is it possible? Thanks.

BTW, it's just for fun.

share|improve this question

You can try using dnsutils to do that exactly. They are not installed by default so here you go:

sudo apt-get install dnsutils

Then you can dig around the DNS System:

dig host.tld

Which will in return give you a DNS Record from your DNS Server specified in /etc/resolv.conf.

Caching is usually done by individual applications, like for example Firefox. To my knowledge there are only tools to flush the cache, not to read it out.


share|improve this answer

Other options to dig command:

dig soa host.tld

dig mx host.tld

For manual page of dig, follow this LINK.

share|improve this answer

Not sure if you're asking about a tutorial or something like the hosts file in Windows. I'm a part time Windows user too. In Ubuntu, the file's under /etc/hosts. To edit:

$sudo nano /etc/hosts
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.