[TriLUG] Slightly OT: editing /etc/hosts in Mac

Brian McCullough bdmc at buadh-brath.com
Thu Apr 10 14:50:12 EDT 2014


On Thu, Apr 10, 2014 at 02:35:04PM -0400, Breandan Dezendorf wrote:
> On Thu, Apr 10, 2014 at 2:29 PM, Brian McCullough <bdmc at buadh-brath.com> wrote:
> > I need to help a Mac-friend add an entry to his /etc/hosts file.
> >
> > I was able to get him into a terminal, and using vi, edited the file,
> > but ran into permission errors when I tried to save it.
> >
> > Would sudo work, or is there a "more approved" method?
> 
> Be aware that files like /etc/hosts aren't ones that Apple's
> installers are very careful with.  I've lost contents before when
> doing major upgrades (10.4.x->10.5).  Also, keep in mind that the
> .local domain is managed by mDNS, and I don't think entries in
> /etc/hosts will influence that.

Thank you.

Fortunately, this is to accomodate testing of a replacement "public"
server, by having his browser go to the new machine instead of the one
that DNS would tell him.


Brian




More information about the TriLUG mailing list