How to clear the local DNS cache in Linux?

You can flush your local DNS cache in Linux by following these easy steps:

1. Open your terminal to use the command line.

2. Log in as root using the su command:

user@host:~$ su 
Password: <type your root password>
root@host:

3. Restart the name service cache daemon:

root@host: /etc/init.d/nscd restart

Please note that the name service cache deamon (nscd) may not be installed by default on your Linux distribution. You should be able to install it through the package manager of your distribution - yum for RedHad-based distros (Fedora, CentOS) and apt-get for Debian-based distros (Ubuntu, Kubuntu).

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Linux client-side website checks

Prior to posting a website down ticket from your Help Desk it is recommended that you test the...

How to log in to my Cloud hosting/VDS via SSH in Linux?

The following instructions are valid only for Hostlantern customers. If you are not a Hostlantern...

What Linux OS Hostlantern uses?

Hostlantern's shared servers use CentOS. Our dedicated solutions also use CentOS.