macos flush dns code example
Example 1: flush dns ubuntu 18.04
sudo systemd-resolve --flush-caches
Example 2: how to flush dns on mac
dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Example 3: macos clear dns cache
macbook$ sudo killall -HUP mDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache