When I try to save changes made in /etc/hosts file on mac i get this error:
"hosts" E212: Can't open file for writing
How can I update it?
When I try to save changes made in /etc/hosts file on mac i get this error:
"hosts" E212: Can't open file for writing
How can I update it?
I found the solution:
just use "sudo" before vi hosts (it will ask for administrator password). By doing this I, basically, open hosts file with Administrator privileges:
$ sudo vi hosts
and the after modifications :wq
works just fine!
My problem was that I was running sudo vi etc/hosts
instead of sudo vi /etc/hosts
¯_(ツ)_/¯