Skip to main content

🌐 macOS Network Reset Commands β€” Quick Reference

Β· One min read

In most cases, running DNS flush + DHCP reset is enough to fix the majority of network issues.


1. Flush DNS Cache​

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

2. Release and Renew IP Address (DHCP)​

sudo ipconfig set en0 DHCP

3. Restart Wi-Fi​

networksetup -setairportpower en0 off && networksetup -setairportpower en0 on

4. Restart Network Interface​

sudo ifconfig en0 down && sudo ifconfig en0 up

πŸ”§ Full Network Settings Reset (more thorough)​

Delete network preference files β€” they will be automatically rebuilt after reboot:

sudo rm /Library/Preferences/SystemConfiguration/com.apple.network.identification.plist
sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
sudo rm /Library/Preferences/SystemConfiguration/preferences.plist

⚠️ Note: A Mac restart is required after running these. All network configurations will be reset to defaults β€” Wi-Fi and other settings will need to be reconfigured.


πŸ“Œ Notes​

InterfaceDescription
en0Usually the Wi-Fi wireless adapter
en1Usually the wired Ethernet adapter

If you're unsure of your interface name, run ifconfig to check.