{"id":8582,"date":"2023-01-25T11:00:56","date_gmt":"2023-01-25T03:00:56","guid":{"rendered":"https:\/\/www.cldy.com\/support\/?post_type=docs&#038;p=8582"},"modified":"2023-01-25T23:34:59","modified_gmt":"2023-01-25T15:34:59","password":"","slug":"how-to-flush-dns-cache-on-linux-computer","status":"publish","type":"docs","link":"https:\/\/www.cldy.com\/support\/help\/how-to-flush-dns-cache-on-linux-computer\/","title":{"rendered":"How To Flush DNS Cache on Linux Computer"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">When there are changes in your network environment, such as a new router or major updates to your business website, it is highly recommended to flush DNS cache so your applications and sites will load properly.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">You can do it on your Linux in just 3 easy steps:<\/span><\/p>\n<p><em><span class=\"\" style=\"font-size: 14px;\">Note: Saved passwords, browser histories, and website login credentials may also be cleared when flushing DNS cache. Make sure to have a copy of your logins and passwords, or bookmark your preferred links before proceeding to flush DNS cache.<\/span><\/em><\/p>\n<p>1. <span style=\"font-weight: 400;\">Click on Ctrl + Alt + T from your keyboard. The Terminal window should appear on your screen.<\/span><\/p>\n<figure id=\"attachment_8583\" aria-describedby=\"caption-attachment-8583\" style=\"width: 800px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/flic.kr\/p\/24N2Qhq\" rel=\"nofollow noopener\" target=\"_blank\"><img decoding=\"async\" class=\"wp-image-8583 size-full\" src=\"https:\/\/www.cldy.com\/support\/wp-content\/uploads\/sites\/12\/2023\/01\/40558679200_c403a5db41_c.jpg\" alt=\"linux terminal emulation\" width=\"800\" height=\"613\" srcset=\"https:\/\/www.cldy.com\/support\/wp-content\/uploads\/sites\/12\/2023\/01\/40558679200_c403a5db41_c.jpg 800w, https:\/\/www.cldy.com\/support\/wp-content\/uploads\/sites\/12\/2023\/01\/40558679200_c403a5db41_c-300x230.jpg 300w, https:\/\/www.cldy.com\/support\/wp-content\/uploads\/sites\/12\/2023\/01\/40558679200_c403a5db41_c-768x588.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><figcaption id=\"caption-attachment-8583\" class=\"wp-caption-text\"><em>This screenshot is from <a href=\"https:\/\/flic.kr\/p\/24N2Qhq\" rel=\"nofollow noopener\" target=\"_blank\">Flickr<\/a><\/em><\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>2. <span style=\"font-weight: 400;\">Based on the type of service of your Linux , type in the corresponding command:<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400; font-family: 'Courier New';\">sudo \/etc\/init.d\/nscd restart<\/span><span style=\"font-weight: 400;\"> (for NCSD)<\/span><\/li>\n<li><span style=\"font-weight: 400; font-family: 'Courier New';\">sudo \/etc\/init.d\/dnsmasq restart<\/span><span style=\"font-weight: 400;\"> (for Dnsmasq)<\/span><\/li>\n<li><span style=\"font-weight: 400;\">(for BIND, there are different commands you can try to use)<\/span>\n<ul>\n<li><span style=\"font-weight: 400; font-family: 'Courier New';\">sudo \/etc\/init.d\/named restart<\/span><\/li>\n<li><span style=\"font-weight: 400; font-family: 'Courier New';\">sudo rndc restart<\/span><\/li>\n<li><span style=\"font-weight: 400; font-family: 'Courier New';\">sudo rndc exec<\/span><\/li>\n<\/ul>\n<\/li>\n<li><i><span style=\"font-weight: 400;\">Note: Enter your password if prompted.<\/span><\/i><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>3. <span style=\"font-weight: 400;\">You may experience a slow down or a temporary stop in the service, but that should be okay. The service may relaunch and confirm that the flush DNS cache process was successfully completed.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When there are changes in your network environment, such as a new router or major updates to your business website, it is highly recommended to flush DNS cache so your applications and sites will load properly. You can do it on your Linux in just 3 easy steps: Note: Saved passwords, browser histories, and website [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[49],"doc_tag":[],"class_list":["post-8582","docs","type-docs","status-publish","hentry","doc_category-dns"],"year_month":"2026-06","word_count":208,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"syd123","author_nicename":"syd123","author_url":"https:\/\/www.cldy.com\/support\/author\/syd123\/"},"doc_category_info":[{"term_name":"DNS","term_url":"https:\/\/www.cldy.com\/support\/help-category\/dns\/"}],"doc_tag_info":[],"_links":{"self":[{"href":"https:\/\/www.cldy.com\/support\/wp-json\/wp\/v2\/docs\/8582","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cldy.com\/support\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.cldy.com\/support\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.cldy.com\/support\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cldy.com\/support\/wp-json\/wp\/v2\/comments?post=8582"}],"version-history":[{"count":1,"href":"https:\/\/www.cldy.com\/support\/wp-json\/wp\/v2\/docs\/8582\/revisions"}],"predecessor-version":[{"id":8584,"href":"https:\/\/www.cldy.com\/support\/wp-json\/wp\/v2\/docs\/8582\/revisions\/8584"}],"wp:attachment":[{"href":"https:\/\/www.cldy.com\/support\/wp-json\/wp\/v2\/media?parent=8582"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.cldy.com\/support\/wp-json\/wp\/v2\/doc_category?post=8582"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.cldy.com\/support\/wp-json\/wp\/v2\/doc_tag?post=8582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}