问题
I am running OSX Yosemite 10.10.2
When I update the hosts file using nano or vi with sudo, the update to hosts file gets reverted after a restart. I am new to Mac. Can someone tell me what I am doing wrong. Obviously I searched the internet before asking this question and I don't think I found a good answer. Apologize if it is a repeat question.
回答1:
I was able to retain the hosts file entry by updating the /etc/hosts.ac in addition to /etc/hosts
I noticed that during logon and while connecting to work network via VPN the hosts file was replaced with the contents from /etc/hosts.ac
来源:https://stackoverflow.com/questions/29125838/hosts-file-update-yosemite