Skip to content

Instantly share code, notes, and snippets.

Created February 27, 2012 16:13
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save joeyblake/1925033 to your computer and use it in GitHub Desktop.
Shell script for cleaning/resetting /etc/hosts files messed up by MAMP Pro
# copy this file to /usr/sbin
# if you have other hosts entries that you would not like to lose, make sure they get added to the hosts.mamp.bak file
cat /etc/hosts.mamp.bak > /etc/hosts
echo 'clean!'
Copy link

One line install

Open up your terminal and run this command
curl > /usr/sbin/hostfix && chmod a+x /usr/sbin/hostfix


This will need to be run as sudo
sudo hostfix

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