17 September 2012

Hosts file gets reset after reboot on Mac Lion

I updated my hosts file on my Mac by doing the following:

sudo vi /etc/hosts

but it was reset every time when system was rebooted.

The reason being I have installed Cisco AnyConnect VPN client, which keeps a separate copy of the original hosts file, and will restore my hosts file from it each time after reboot.

ls /etc/hosts*   =>  /etc/hosts   /etc/hosts.ac    /etc/hosts.equiv

So the solution is to update both "/etc/hosts" and "/etc/hosts.ac" to keep them in sync.

Hope this helps you too.


No comments:

Post a Comment