Mac Tips

How-To: Flush DNS cache i Mac, Windows and Linux

When doing changes on the network, e.i. web portals for login, it can be handy to clear the DNS cache in the test device to force the device to discover the changes.

Here is a handy list of the command on often used devices.

Most OS X and macOS

sudo killall -HUP mDNSResponder

OSX 10.10.0 – 10.10.3

sudo discoveryutil mdnsflushcache

OSX 10.5 – 10.6

sudo dscacheutil -flushcache

Windows

ipconfig /flushdns

Linux

/etc/init.d/named restart

or

/etc/init.d/nscd restart

dependent on distro

Leave a Reply