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

John Broome jbroome at gmail.com
Fri Apr 11 01:04:49 EDT 2014


I've found even with sudo you need to do a :wq!  to force the write.


On Thu, Apr 10, 2014 at 2:50 PM, Brian McCullough <bdmc at buadh-brath.com>wrote:

> 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
>
>
> --
> This message was sent to: jbroome at gmail.com <jbroome at gmail.com>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that
> address.
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web  :
> http://www.trilug.org/mailman/options/trilug/jbroome%40gmail.com
> Welcome to TriLUG: http://trilug.org/welcome
>


More information about the TriLUG mailing list