Deleted hosts in terminal, what now? please help

Discussion in 'macOS' started by mladenz, Jan 3, 2009.

  1. mladenz macrumors regular

    Jan 16, 2008
    Hi guys,

    Ive accidently deleted all my hosts in my terminal and now my MBP boots up slow.

    Ive done the following:

    - open terminal
    - sudo -s
    - enter password
    - sudo pico etc/hosts

    and i've deleted everything!

    Now when i want to put it back i copy this:

    Then i press CTRL + X --> Y to save but then i get this:

    And i dont know what to fill in! can anyone help me please!?
  2. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    Why did you delete your host file in the first place?
  3. mladenz thread starter macrumors regular

    Jan 16, 2008
  4. gnasher729 macrumors P6


    Nov 25, 2005
    If you can't create the file with pico, just create it with TextEdit, save it somewhere in your home directory, then use the mv command to move it to /etc/hosts .
  5. mladenz thread starter macrumors regular

    Jan 16, 2008
    thanks for the reply,

    Where can i find the 'mv command' and i cant seem to find the folder(hosts) where ill have to put it in.

    Can you please explain it to me?

    PS: when i fill in a name or simply press 'return' when the terminal asks me "File Name to Write: etc/hosts" then i get "bus error"

Share This Page