Changing hosts in the command line



Run the program "Command prompt" in the system. To do this go to menu "start" - "All programs" - "Accessories". After that click on "Command prompt". In the list of options, select "Run as an administrator". If necessary, enter the required password if you are using account Guest or the account of a normal user. You will see a black window where you'll need to enter the command notepad C:\Windows\System32\drivers\etc\hosts. After a correct input you will see the editor window of Notepad to be opened with administrator privileges required to make changes and edit the document.

Change the file according to your requirements. To add the undesirable to visit the resource, enter a line like "adressat 127.0.0.1" where 127.0.0.1 is blocking access to the site from the current computer and "adressat - Internet address resource, access to which you want to close.


Opening the file directly from the editor window



You can also open the hosts file, not using command line. To do this, change directory to start - My computer - Local disk C:". In the directory list, select Windows – System32. In the list of programs, locate the file with the name Notepad (notepad.exe). Right click on the document and select "Run as an administrator". If necessary, enter the password of the administrator account in the system and click "OK". You will see the window "Notepad". Go to menu "File" - "Open".

Through the opened directory, browse to the folder "Computer" "Local disk C: - Windows – System32 – drivers – etc. In the list of files, select hosts and start editing it. After making the necessary changes, click "File" - "Save". If you can't find the hosts file in the specified folder, use the switch "All files" available in the bottom right corner of the window "Open" right after the line "file Name".

Edit the hosts file you can also under an administrator account using Windows Explorer. Click "start" - "My computer" and then navigate to "Local disk C: - Windows – System32 – drivers – etc. If the file does not appear in the list, go to menu "Tools" - "folder options". Select the tab "View" and then click "Show hidden files". Click "OK" to apply the changes. After that right click on hosts file and select "Open with".