This is my personal blog. The views expressed on these pages are mine alone and not those of my employer.

Wednesday, May 21, 2008

Changing Mac OS X Hosts File

This is more for me so I don't forget it, but other folks might find it useful. If you want to add or delete an entry from the Mac OS X /etc/hosts file, its a bit more involved than on Windows. Here's the steps you need to do.

To add an entry:
  • Edit /etc/hosts
  • sudo niload -v -m hosts . < /etc/hosts
  • If on Firefox, go to Tools> Clear Private data and clear things.
  • lookupd -flushcache
To remove the entry:
  • Edit /etc/hosts
  • sudo niload -v -d hosts . < /etc/hosts
  • If on Firefox, go to Tools> Clear Private data and clear things.
  • lookupd -flushcache
Notice the -d for deletion.
// posted by Brad Neuberg @ Wednesday, May 21, 2008 7 Comments Links to this post

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]

AltStyle によって変換されたページ (->オリジナル) /