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 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.
1. Click on Ctrl + Alt + T from your keyboard. The Terminal window should appear on your screen.
2. Based on the type of service of your Linux , type in the corresponding command:
- sudo /etc/init.d/nscd restart (for NCSD)
- sudo /etc/init.d/dnsmasq restart (for Dnsmasq)
- (for BIND, there are different commands you can try to use)
- sudo /etc/init.d/named restart
- sudo rndc restart
- sudo rndc exec
- Note: Enter your password if prompted.
3. 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.