How to Flush DNS on Ubuntu

Reading time: less than 1 minute

How to Flush DNS on Ubuntu

First you should try this command:
sudo /etc/init.d/dns-clean

If by chance this does not work, then test this other option: (Flush DNS Cache in Ubuntu by restarting the nscd)

sudo apt-get install nscd
sudo /etc/init.d/nscd restart