Skip to content

Instantly share code, notes, and snippets.

@baldowl
Created January 9, 2011 12:05
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baldowl/771629 to your computer and use it in GitHub Desktop.
Save baldowl/771629 to your computer and use it in GitHub Desktop.
Using OS X's Directory Service instead of /etc/hosts
# Adding a host record.
sudo dscl . -create /Hosts/www.example.com ip_address 10.1.2.3
# Removing that same host record.
sudo dscl . -delete /Hosts/www.example.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment