Last active
February 3, 2025 01:06
-
-
Save lordjabez/6cce622ad9832c559c468475a9b0356f to your computer and use it in GitHub Desktop.
Restart network on MacOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
# Run with sudo | |
ifconfig en0 down | |
route flush | |
ifconfig en0 up | |
dscacheutil -flushcache | |
killall -HUP mDNSResponder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment