pepebe
7/23/2015 - 7:38 AM

Edit host file on macos to access a domain from another ip.

Edit host file on macos to access a domain from another ip.

sudo nano /etc/hosts

Add ip and target below local host entries

123.456.78.900 example.com

Use ctrl+0 to save and ctrl+x to exit nano.

Afterwards flush you dns cache:

osc >= 10.6 sudo killall -HUP mDNSResponder

osx < 10.6 dscacheutil -flushcache