Categories
General System Software Notes

Flush DNS Cache

Flush DNS Cache:

Looking for a way to flush your DNS cache?

It’s as easy as:

Leopard – sudo dscacheutil -flushcache
Tiger – sudo lookupd -flushcache

Windows – ipconfig /flushdns

Further info here – Forcing an IP Address

8 replies on “Flush DNS Cache”

Yes, it does.

The first command is for tiger.
The second one is for Win 2k/XP/2k3.

The first command flushes only the cache maintained by lookupd.
DNS entries may be cached elsewhere.

If they “may be cached elsewhere” would you care to share where that might be?
and if cached elsewhere how does one clear it?

Forcing an IP Address…

In the “real” world you simply add an entry to /etc/hosts like

1.2.3.4 myhost

The Mac OS X world is different. For version 10.5 and later you do the following

# Create the mapping
sudo dscl localhost -create /Local/Default/Hosts/x.y.z IP…