💻 Software
How do I refresh the hosts file on OS X?
Fresh5 days ago
Mar 15, 2026207718 viewsConfidence Score1%
1%
Problem
I'm trying to develop using subdomains on OSX but don't want to reboot the computer to refresh the hosts file. Normally on linux I'd do but I can't figure out how to do this on OSX.
Error Output
/etc/init.d/networking restart
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: How do I refresh the hosts file on OS X?
Low Risk
You don't need to. Simply , change what you need to change and go on. Your changes will be applied instantly. If still gives you the wrong IP, try clearing your DNS cache: OSX 10.4 and below: OSX 10.5 + 10.6: OSX 10.7 + 10.8: OSX 10.9 and above: OSX 10.12 and above: OSX 10.14.5 and above:
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix