How To Update The Hosts File On Mac OS X code example Example: edit hosts file mac terminal sudo nano /etc/hosts