Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Shell script for cleaning/resetting /etc/hosts files messed up by MAMP Pro
#!/bin/bash
# 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!'
@joeyblake

This comment has been minimized.

Copy link
Owner Author

joeyblake commented Feb 27, 2012

One line install

Open up your terminal and run this command
curl https://raw.github.com/gist/1925033/88a479a363b211253d0444fe7d4e2cf5afcc6f75/hostfix > /usr/sbin/hostfix && chmod a+x /usr/sbin/hostfix

Usage

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.