I think I ********* up my host files

Discussion in 'Mac Basics and Help' started by Infinity Square, Dec 19, 2011.

  1. Infinity Square macrumors newbie

    Dec 18, 2011
    This is kind of a long story about how this happened, but you don't have to listen.

    Long story short, my friend was showing me how to get an adobe key check blocker (for pirating), and I had NO IDEA what he was showing me what to do. In retrospect, I should not even had him touch my computer, but I digress. Anyways, I do the thing where he opens the pseudo host text file thing with terminal. I "fix" the host files, then save it. Right before he tells me he sent me the wrong text. Right after I saved, terminal stopped responding to what I told it to do.

    In short, I messed up the host text file and terminal doesn't do anything. I open a window and it doesn't type anything. It's just blank. No matter what I type or how many times I press enter, it just won't do anything.

    Now, I know exactly how to fix it. I just... can't. I know exactly what the host file is supposed to look like, I just can't get to it. I've tried looking for it through finder, but to no avail. The only way it seems possible is by terminal. Which doesn't work.

    Oh, the irony.

    If anyone knows either where the host file is, or how to fix terminal (or my computer in general), help would be REALLY appreciated. I'm scared to restart my computer to see if it'll fix it, for I think I did something similar to messing with "system 32" on Windows machines.

    Yes, I know, I'm stupid, but please help.
  2. johto, Dec 19, 2011
    Last edited: Dec 19, 2011

    johto macrumors 6502


    Jan 15, 2008
    The file is located in /etc/ directory and the file name is hosts
    So the full location of the file is /etc/hosts
    The content of the file should be(OS X Lion):

    # Host Database
    # localhost is used to configure the loopback interface
    # when the system is booting.  Do not change this entry.
    ##	localhost	broadcasthost
    ::1             localhost 
    fe80::1%lo0	localhost
    I cut off some of my own "additions"..hehe hehe, so this example should be what it is on by default.

    You can edit and save the file using textwrangler texteditor, with that you can make sure its a right type of ASCII file(unix) style. In textwrangler to open the file, use the "open file by name" and type /etc/hosts
    See the bottom, make sure its "UNIX LF" and save the file(or overwrite the old one).

    Hope this helps. Good luck :)
  3. Infinity Square thread starter macrumors newbie

    Dec 18, 2011
    Oh man, thanks. I fixed my hot files, and my computer was working ALMOST normally. The only problem is that terminal is stuff f'd up. At least I feel safe to turn off my computer now ^_^

    Maybe that'll help.

Share This Page