Do you get as annoyed as I do when you need to repeatedly type in the same set of Bash commands over and over and over again?
Just for you, newly released today (thought I had already released this but turns out I hadn’t), here is a simple script to clean your Linux DNS cache.
Just click it to run it! The magic of code never ceases to amaze me.
This is a really simple script so I won’t go into too much detail.
The Clean DNS script is designed to sit on your desktop where it will wait for you to click it. When you click the file it will open a terminal, ask for your password then run a chain of 4 commands that will clean your DNS cache(s).
Why 4 commands? Because different operating systems use different programs to manage the DNS cache and we want to be sure we clean all probable caches.
How to Use Clean DNS
- Download the file cleandns.sh.
- Make the script executable. Right-click > Properties > Executable
- Click the script to run it.
The script can also be run from the command line with ./cleandns.sh (you will need to be in the same directory as the script).
I could have created an alias for the set of commands run to clean the Linux DNS cache but I prefer to click a script for quickness.
Hope you find this to be as useful I do.