Skip to content

Instantly share code, notes, and snippets.

@pawcik
Forked from pawel-jedruch-miquido/hosts.sh
Created July 19, 2017 07:43
Show Gist options
  • Select an option

  • Save pawcik/6a93ed9c69b9847c81170b4dd8210d50 to your computer and use it in GitHub Desktop.

Select an option

Save pawcik/6a93ed9c69b9847c81170b4dd8210d50 to your computer and use it in GitHub Desktop.
Fix OS X issue with localhost DNS Lookup (/etc/hosts)
hostname=$(scutil --get LocalHostName)
#Add this line to /etc/hosts/
echo "127.0.0.1 localhost ${hostname}.local" >> /etc/hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment