how to edit private hosts file in mac os code example Example: sudo nano /etc/hosts sudo nano /etc/hosts