Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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!'

This comment has been minimized.

Copy link
Owner Author

@joeyblake joeyblake commented Feb 27, 2012

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
You can’t perform that action at this time.