Flush DNS command for Linux, Ubuntu, Fedora, Redhat, Windows. Why it is necessary ?

Flush DNS command for Linux, Ubuntu, Fedora, Redhat, Windows. Why it is necessary ?

Web server contains the web pages and DNS storage cache stores the recently visit web pages location. This process always runs and DNS cache always store. Sometimes if you use web pages in which some changes made but because of DNS cache you get the old experience or sometimes 404 errors. This is best practice to always keep on removing kind of cache for the always good experience. The removing of cache is called flush. In this article, you will learn flush DNS command and you can easily apply so get ready to learn.

There is kind of operating system and server so here we will see all the commands one by one and it will assist you to apply.

Flush DNS Command in Linux
First, we are discussing the caching in Linux, you can clean the DNS storage cache in Linux just use these simple steps :
Open your terminal to use the command line.
Log in as root using the su command:
# user@host:~$ su
# Password: <type your root password>
# root@host:

Restart the name service cache daemon:
# root@host: /etc/init.d/nscd restart
It is important to know that name service cache daemon (nscd) may not be installed by default on your Linux system. You have to install it through the package manager of your system. If you have done all the process so you will able to flush the cache.

Flush DNS Command in Ubuntu
There are different command uses to clear cache in different operating system and server. In Ubuntu, here few command that flushes DNS cache.

Open up a terminal window by press Ctrl+Alt+T.
If nscd is not installed yet so first follow the command
# sudo apt-get install nscd
Flush DNS Cache in Ubuntu by restarting the nscd
# sudo /etc/init.d/nscd restart
Flush DNS Command Fedora
Now about the Fedora so there is a package called NetworkManager-config-server that sets by default.

No configuration about `dns=dnsmasq` in
/etc/NetworkManager/NetworkManager.conf

Flush DNS command redhat
It may be some time needed to get rid of your DNS Storage cache mostly. There is no immediate way or a control that can do this, however, you still have a way to do it.
All it needs is to reboot the Daemon to get rid of the DNS cache.
# service nscd restart
or
# /etc/init.d/nscd restart
This is best practice, you should flush the DNS Cache in your Redhat and now you flushed the DNS Cache in your Redhat.

Flush DNS Command Windows
Windows 8
Perform the following steps for Windows 8:

1). Press Win+X to open the WinX Menu
2). Right-click Command Prompt and select Run as Administrator.
3). Run the following command:
4). # ipconfig /flushdns
5). If the command succeeds, you will get following message:
Windows IP configuration successfully flushed the DNS Resolver Cache.
Why is It Necessary To Flush DNS?
Here need to know is flush DNS cache necessary so read carefully and you will get the right tips for flush DNS.
Cleaning up your storage cache is also a reasonable maintenance practice. DNS storage cache data doesn't take up much area, but the list can get an extended time if you don't clear the storage cache for an extended period. This can also prevent the storage cache from coming back bad results and 404 mistakes when going back to old websites, as old IP details may not indicate the current website details.
Author
bhawanisingh
Views
34,791
First release
Last update
Rating
0.00 star(s) 0 ratings
Top