How to flush DNS in Ubuntu 13.10? [duplicate]

We recently moved our website to a new server. But after changing the NS (name server) records, I can't access my website. The hosting provider said we need to flush the DNS settings in order to see the new website.

I searched relating to this but I couldn't find a way to flush DNS settings in Ubuntu 13.10.


Solution 1:

Install nscd using the following command if not yet

sudo apt-get install nscd

Flush DNS Cache in Ubuntu by restarting the nscd

sudo /etc/init.d/nscd restart

Solution 2:

There is no actual need to flush DNS as Ubuntu doesn't cache DNS. Instead, your ISP may be caching DNS. If you want to enable DNS cache, install pdnsd and resolvconf.