If you ca n’t do any of the above, see below .
bet on up all data before proceed .
If you have more than one user bill, you must be logged in as an administrator.
Reading: hosts file mess up – Apple Community
Triple-click anywhere in the telephone line below on this page to select it :
capable -e /etc/hosts
Copy the selected text to the Clipboard by pressing the key combination command-C .
Launch the built-in Terminal application in any of the follow ways :
☞ Enter the first base few letters of its mention into a Spotlight search. Select it in the results ( it should be at the top. )
☞ In the Finder, blue-ribbon Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the booklet that opens.
Read more: How to Make Your Own Website Without a Host
☞ Open LaunchPad and start typing the name .
paste into the Terminal window by pressing command-V. I ‘ve tested these instructions only with the Safari web browser. If you use another browser, you may have to press the render key after pasting. A TextEdit window should open. At the top of the window, you should see this :
# Host Database
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entrance.
: :1 localhost
Below that, you may see some other lines. The first gear 9 lines should be precisely as above, apart from differences in the blank quad within lines. otherwise you ca n’t use this procedure—STOP and ask for guidance .
If the contents of the TextEdit window are as described, and there are extra lines in the file, close the window, then enter the following command in the Terminal window in the lapp way as before ( by imitate and paste ) :
sudo sed -i~ ’10, $ vitamin d ‘ /etc/hosts
This time you ‘ll be prompted for your login password, which wo n’t be displayed when you type it. Type carefully and then press return. If you don ’ t have a login password, you ’ ll need to set one before you can run the command. You may get a erstwhile admonitory to be careful. Confirm. Quit Terminal .
If you see a message that your username “ is not in the sudoers file, ” then you ‘re not logged in as an administrator. Log in as one and start over .
That will fix the hosts file. There is now a copy of the previous hosts file with the diagnose “ hosts~ ” in the same booklet as “ hosts ”. You can delete the copy if you wish. Do n’t delete the file named “ hosts ” .