{"id":1613,"date":"2021-09-02T11:11:39","date_gmt":"2021-09-02T11:11:39","guid":{"rendered":"https:\/\/ownwebservers.com\/kb\/?p=1613"},"modified":"2021-09-02T11:11:39","modified_gmt":"2021-09-02T11:11:39","slug":"how-to-flush-the-local-dns-cache-in-linux-server","status":"publish","type":"post","link":"https:\/\/ownwebservers.com\/kb\/how-to-flush-the-local-dns-cache-in-linux-server\/","title":{"rendered":"How to Flush the Local DNS Cache in Linux Server"},"content":{"rendered":"<p>If your system has difficulty reaching an explicit web site or server this could be due to a corrupt local DNS cache.<\/p>\n<p>Below are the steps that will show you the way to clear your local DNS cache (\u201cflush\u201d it) for Linux Server.<\/p>\n<p><strong>Step 1:<\/strong> For Using the command line open your terminal<\/p>\n<p><strong>Step 2:<\/strong> using the su command, Login as root user :<\/p>\n<pre>user@host:~$ <strong>su <\/strong>\r\nPassword: (type your root user password here)\r\nroot@host:<\/pre>\n<p><strong>Step 3:<\/strong> After that you have to restart the name service cache daemon (NSCD):<\/p>\n<pre>root@host: <strong>\/etc\/init.d\/nscd restart<\/strong><\/pre>\n<p>NSCD (Name Service Caching Daemon) is one of the most commonly used DNS caching Linux applications.<\/p>\n<p>If you&#8217;ve got NSCD installed, you can clear the local DNS cache by running one among the subsequent commands in your favorite terminal\/shell application. To clear local DNS cache for this user:<\/p>\n<pre>nscd -i hosts<\/pre>\n<p>To clear local DNS cache for all users use below command:<\/p>\n<pre>nscd -I hosts<\/pre>\n<blockquote><p>Note: The name service cache daemon (NSCD) won&#8217;t be installed by default on your Linux. You need to be ready to install it by using the package manager of your distribution \u2013 yum for RedHat-based distribution like Fedora, CentOS and apt-get for Debian-based distribution like Ubuntu, Kubuntu.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>If your system has difficulty reaching an explicit web site or server this could be due to a corrupt local DNS cache. Below are the steps that will show you the way to clear your local DNS cache (\u201cflush\u201d it) for Linux Server. Step 1: For Using the command line open your terminal Step 2: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-1613","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/1613","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/comments?post=1613"}],"version-history":[{"count":1,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/1613\/revisions"}],"predecessor-version":[{"id":1614,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/1613\/revisions\/1614"}],"wp:attachment":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/media?parent=1613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/categories?post=1613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/tags?post=1613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}