Deleted hosts in terminal, what now? please help

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

  1. mladenz macrumors regular

    Joined:
    Jan 16, 2008
    #1
    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

    Cromulent

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

    Joined:
    Jan 16, 2008
  4. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #4
    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

    Joined:
    Jan 16, 2008
    #5
    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