{"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"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v15.2.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Flush the Local DNS Cache in Linux Server - OWS KB<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ownwebservers.com\/kb\/how-to-flush-the-local-dns-cache-in-linux-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Flush the Local DNS Cache in Linux Server - OWS KB\" \/>\n<meta property=\"og:description\" content=\"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;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ownwebservers.com\/kb\/how-to-flush-the-local-dns-cache-in-linux-server\/\" \/>\n<meta property=\"og:site_name\" content=\"OWS KB\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-02T11:11:39+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\">\n\t<meta name=\"twitter:data1\" content=\"admin\">\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data2\" content=\"1 minute\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"OWS KB\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/ownwebservers.com\/kb\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-flush-the-local-dns-cache-in-linux-server\/#webpage\",\"url\":\"https:\/\/ownwebservers.com\/kb\/how-to-flush-the-local-dns-cache-in-linux-server\/\",\"name\":\"How to Flush the Local DNS Cache in Linux Server - OWS KB\",\"isPartOf\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\"},\"datePublished\":\"2021-09-02T11:11:39+00:00\",\"dateModified\":\"2021-09-02T11:11:39+00:00\",\"author\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\"},\"breadcrumb\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-flush-the-local-dns-cache-in-linux-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ownwebservers.com\/kb\/how-to-flush-the-local-dns-cache-in-linux-server\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-flush-the-local-dns-cache-in-linux-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/how-to-flush-the-local-dns-cache-in-linux-server\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/how-to-flush-the-local-dns-cache-in-linux-server\/\",\"name\":\"How to Flush the Local DNS Cache in Linux Server\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ba5db5841d48bd7517bb2583e13983e6d2fa56a4099a0b3c61ad2daefc321303?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/ownwebservers.com\/kb\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","_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}]}}