Skip to content

Instantly share code, notes, and snippets.

@miend
Created September 14, 2012 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miend/3722915 to your computer and use it in GitHub Desktop.
Save miend/3722915 to your computer and use it in GitHub Desktop.
Flush DNS cache, release and renew network IP address
#!/bin/bash
#if OSX
sudo dscacheutil -flushcache
sudo ipconfig set en0 BOOTP
sudo ipconfig set en0 DHCP
sudo ipconfig set en1 BOOTP
sudo ipconfig set en1 DHCP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment