转自:
https://blog.csdn.net/Qin605/article/details/78444888
Windows:
Debian/Ubuntu:
sudo /etc/rc.d/init.d/nscd restart
Linux with systemd:
sudo systemctl restart network.service
Fedora Linux:
sudo systemctl restart NetworkManager.service
Arch Linux/Manjaro with Network Manager:
sudo systemctl restart NetworkManager.service
Arch Linux/Manjaro with Wicd:
sudo systemctl restart wicd.service
Mac OS X:
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder