This article explains how to flush the local DNS cache in a Linux server. If your computer encounters difficulty accessing a particular website or server, it could be credited to a corrupted local DNS cache.

Follow the steps-

  1. Access the command line by opening your terminal.
  2. Using the su command, log in as the root user-
    user@host:~$ su 
    Password: (type your root user password here) 
    root@host: 
  3. Restart the name service cache daemon (NSCD)-
    root@host: /etc/init.d/nscd restart
  4. NSCD, which stands for Name Service Caching Daemon, is a commonly used DNS caching application in Linux.
  5. If you have NSCD installed, you can clear the local DNS cache for the current user by running the following command in your terminal or shell. To flush the local DNS cache for the current user-
    nscd –i hosts
  6. To flush the local DNS cache for all users-
    nscd -I hosts

Note: The name service cache daemon (NSCD) may not come pre-installed on your Linux system. You can install it using your distribution’s package manager – use yum for RedHat-based distributions like Fedora and CentOS, or apt-get for Debian-based distributions such as Ubuntu and Kubuntu. 

This way, you can flush the local DNS cache in the Linux server. If you liked our article then you will surely love our support. Additionally, you can discover How To Manage DNS Zone Editor in cPanel

Popular Posts You May Read

Explore more hosting insights, tips and industry updates.

Optimizing Virtual Networks With eNlight

Cloud Computing and virtual networks are cost-effective ways to manage company data. In the old…

nderstanding Cron Jobs: Automate Tasks on Linux Servers

Cron allows users to automate repetitive system administration tasks such as tape backups, database reorganization,…

PHPauction

What is PHPauction? Phpauction is a software which help its customers to retain their privacy…