Facebook Twitter Instagram
    TechOwns
    • Home
    • Best Apps
    • How To
    • Streaming
    • VPN
    • What is?
    • News
    TechOwns
    Home ยป How to Flush DNS on Linux [4 Different Methods]
    How To

    How to Flush DNS on Linux [4 Different Methods]

    NathanBy NathanMarch 10, 2020Updated:March 10, 2020No Comments3 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr WhatsApp VKontakte Email
    Flush DNS on Linux
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Contents

    • How to Flush DNS Cache on Linux?
        • Flush DNS Cache using Systemd Resolved
        • Clear DNS Cache using DNSMasq
        • Clear DNS Cache using nscd
    • Flush DNS Cache on Linux using named
    • Our Opinion

    DNS (Domain Name Server) is a network protocol that translates IP address to fully qualified Domain names and vice versa. It is more user-friendly on your Linux platform. To use DNS on your Linux you must have DNS server configured to handle the resolution process. Linux is the well known operating system used by a lot of people around the world. If you are facing any issues, you are required to flush the DNS cache stored on your Linux devices to resolve the issues.

    DNS cache is a temporary data which contains the information related to your DNS. Like the web browsers, the operating system will store cache files called Domain Name System cache. DNS Cache stores information related to all your visited websites. One of the main disadvantages of DNS caches is that it makes easier for the hackers to track your online activities. Flushing DNS cache involves different navigation depending on OS.

    How to Flush DNS Cache on Linux?

    By default, the Linux never store any OS-level DNS caches. If you manually installed DNSMasq, nscd, or systemd-resolves on your Linux, it might store any temporary files.

    Flush DNS Cache using Systemd Resolved

    Before flushing the DNS cache, you need to check whether the service is running or not by using the following command line.

    sudo systemctl is-active systemd-resolved.service
    Flush DNS Cache on Linux

    Note: If any service is opened, then you can easily kill the process on Linux using the command line.

    If the service is running on your Linux, the command will print active. If it is not, it will print inactive in the command line.

    To flush the Systemd Resolved DNS cache, type the following command,

    sudo systemd-resolve --flush-caches
    Flush DNS Cache on Linux

    Clear DNS Cache using DNSMasq

    If your Linux device uses DNSMasq and a cache server, you need to restart the DNSMasq service to clear the DNS cache.

    Press Ctrl+Alt+T to open the terminal on your Linux.

    Enter the following command to restart the DNSMasq service.

    sudo systemctl restart dnsmasq.service 

    In case the above command line doesn’t work, enter the following command line.

    sudo service dnsmasq restart 

    Clear DNS Cache using nscd

    If your Linux device store the DNS cache thorough nscd, then you need to restart the nscd service.

    Open the terminal using Ctrl+Alt+T keyboard keys.

    Enter the following command line into the terminal:

    sudo systemctl restart nscd.service 

    Or use another command line:

    sudo service nscd restart 

    Flush DNS Cache on Linux using named

    BIND is one of the traditional options to delete the built-in DNS servers stored in your Linux device.

    Open the Terminal by using Ctrl+Alt+T keyboard keys. Now enter the following command line:

    sudo systemctl restart named

    Our Opinion

    Flushing DNS doesn’t alter any activities on your Linux. By flushing DNS, issues related to DNS will get resolved. By following the above steps, you can easily clear DNS cache on your Linux Operating System.

    If you have any queries or feedback, comment it in the section below. Stay connected with us on Facebook and Twitter for more updates.

    Was this article helpful?
    YesNo
    Guide Tips & Tricks
    Share. Facebook Twitter Pinterest LinkedIn Tumblr WhatsApp Email
    Previous ArticleHow to Put Parental Controls on iPad [2 Methods]
    Next Article Best PDF Reader for Android Phone/Tablet [2021]
    Nathan
    • Website

    Related Posts

    How to Stream UEFA Champions League 23/24 on Firestick

    September 23, 2023

    How to Watch UFC Fight Night | Fiziev vs Gamrot

    September 22, 2023

    How to Watch UFC Fight Night on Apple TV

    September 22, 2023

    How to Watch La Liga Season 2023/24 in the US

    September 22, 2023

    Leave A Reply Cancel Reply

    How to Stream UEFA Champions League 23/24 on Firestick

    September 23, 2023

    How to Watch UFC Fight Night | Fiziev vs Gamrot

    September 22, 2023

    How to Watch UFC Fight Night on Apple TV

    September 22, 2023

    How to Watch La Liga Season 2023/24 in the US

    September 22, 2023

    How to Watch Bundesliga Season 2023/24 in the US

    September 22, 2023

    How to Watch Ligue 1 Season 23/24 in the US

    September 22, 2023

    How to Watch F1 [Formula 1] on Xbox One

    September 22, 2023

    How to Watch Serie A Season 2023/24 in the US

    September 22, 2023
    • Home
    • Privacy policy
    • Terms of Service
    • Affiliate Disclosure
    • Advertise
    • Editorial Guidelines
    • Contact Us
    © 2023 TechOwns.

    Type above and press Enter to search. Press Esc to cancel.