Can't Edit the Hosts directory

Discussion in 'macOS' started by FlameArchon, Jan 26, 2012.

  1. FlameArchon macrumors newbie

    Joined:
    Jan 26, 2012
    #1
    So, I want to make some changes in the hosts directory. So, as root, I type this in:

    sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts

    However, I get this response;

    2012-01-26 19:37:49.146 TextEdit [233:8e13] NSTrackPersistentURLs:LSSharedFileLiseInsertItemURL ( ) failed at inserting URL file://localhost/etc/hosts (etc/hosts)

    Even though TextEdit still opens with exactly what I'm looking for. However, even logged in as root it won't let me make any changes. Any ideas?
     
  2. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #2
    try editing it with pico (using sudo)

    I think you might need start an OSX app using open, that is sudo open /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts
     

Share This Page