Go to ...

Techpository

A Better Technical Repository

RSS Feed

Linux: How to flush DNS in Ubuntu


Sometimes you need to see the changes that have been made on a DNS server, but these changes are stuck in your workstation DNS cache.

Similar to Windows ipconfig /flushdns you can flush your Linux computers DNS.
You must first install the name service cache daemon (nscd).  This is not usually installed by default.
After the install is complete you can simply restart the nscd as need to clean your DSN cache.

  1. sudo apt-get install nscd
  2. Flush DNS Cache in Ubuntu Using the following command
  3. sudo /etc/init.d/nscd restart