March 22, 2015

OS/X /etc/hosts – Adding Host Records

OS/X Mavericks Logo OS/X /etc/hosts – Adding Host Records is pretty straight forward.  Typically I do this when I’m running a local virtual machine or for testing services.  Slightly different then Linux because of OS/X DNS caching services.

  1. Edit /private/etc/hosts
  2. Add
  3. Flush the cache
sudo vi /private/etc/hosts
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder