Skip to content

Instantly share code, notes, and snippets.

@GuyHarwood
Last active February 24, 2016 15:46
Show Gist options
  • Save GuyHarwood/5598542 to your computer and use it in GitHub Desktop.
Save GuyHarwood/5598542 to your computer and use it in GitHub Desktop.
Map Parallels VM IP to DNS entry on OSX

sudo dscl localhost -create /Local/Default/Hosts/ridiculous.nonsense.monkeys IPAddress 192.168.0.1

Enter your password when asked, and you can now ping 192.168.0.1 with the name ridiculous.nonsense.monkeys

You can see the results of your work with:

dscl localhost -readall /Local/Default/Hosts

And to undo your handy-work:

sudo dscl localhost -delete /Local/Default/Hosts/ridiculous.nonsense.monkeys

P.S. You can see the results of your BSD flat-file method with this command:

dscl localhost -readall /BSD/local/Hosts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment