Friday, May 11, 2012

Flushing DNS in Linux

This is the easiest possible way that I know of to flush your DNS in Linux when you are not running a DNS server. Simply toggle the lan port off and then back on.


$sudo ifdown wlan0
Device state: 30 (disconnected)

$sudo ifup wlan0
Active connection state: activating
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/10
state: activating
state: activated
Connection activated

You change the "wlan0" above to "eth0" or whatever else your lan card might be called.

No comments:

Post a Comment