Rick Cogley's Tech Logr

Short Technical Laser Bursts %%

RC Logr 20200511 112219

Monday, 11 May, 2020

If you are making DNS changes, you may want to flush your local dns responder cache, so here is how to do it. 🤖

On a modern Mac, put it in a shell function (c.f. zsh):

1
2
3
4
5
6
function flushdns (){
  echo "Flushing DNS, enter your user password if prompted:"
  sudo killall -HUP mDNSResponder
  sudo killall mDNSResponderHelper
  sudo dscacheutil -flushcache
}

On Windows, do this in a command prompt:

1
  > ipconfig /flushdns

On Linux, it can be app by app or, on Ubuntu/Debian, you can do either of:

1
2
  $ sudo systemd-resolve --flush-caches
  $ sudo /etc/init.d/dns-clean start

RC Logr 20200511 112219 - If you are making DNS changes, … Rick Cogley
Back to Home Tweet Link