That command should report the file to look like this: Now to confirm the hosts file saved properly, go to the Terminal app and type the following: Name the file ‘hosts’ and save, you’ll need to enter an administrator password to be able to write to this directory.Hit Command+Shift+G to bring up the “Go To Folder” window, now type in /etc/ and go.Choose “File > Save As” and uncheck the box for “If no extension is provided use txt” – this is important, DO NOT INCLUDE A FILE EXTENSION.Select All text and choose “Format > Make Plain Text” and click “OK.Open TextEdit and paste the above code block into a new empty blank file.TextEdit is the simple text editor bundled with every Mac, you’ll also need administrator access to complete this task since the hosts document is a system file in a restricted directory. Those familiar with the command line shouldn’t have a problem with this, but if you’re not quite sure what to do you can also complete the process from the TextEdit app as we’ll describe below: Restore an Unmodified Original Hosts File to Mac OS X # localhost is used to configure the loopback interface Just copy and paste this over an existing hosts file then save it as plain text to restore it. The Default & Original /etc/hosts File in Mac OS X Looks Like ThisĬontained within the code block is the original hosts file and the four default entries. If you’re not sure how to do that, you can follow these instructions to learn how to edit the file the proper way from the command line and simply overwrite it with the hosts block below, or use TextEdit and save over the messed up version, which is what we’ll walk through below. You’ll want to copy the text below and paste it into a plain text file, stored at the /etc/hosts path. No additional entries or modifications are included in the version below, which is a direct replica from that found in OS X Mavericks, making it safe to return to if you accidentally messed up the important hosts document during a change or adjustment. An example of that has been included below for convenience, but you can retrieve it from another Mac if need be as well. Fortunately, restoring the original default /etc/hosts file back to normal is pretty easy, and the best way to get back the original untouched default file is to simply overwrite the existing damaged hosts file with a new clean version that is a copy of what comes default in Mac OS X.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |