How To Change Hosts In Windows 7?

Table of contents:

How To Change Hosts In Windows 7?
How To Change Hosts In Windows 7?

Video: How To Change Hosts In Windows 7?

Video: How To Change Hosts In Windows 7?
Video: Edit Hosts File in Windows 7 2024, May
Anonim

The hosts file is used in Windows operating families to restrict access to unwanted Internet resources. To edit it in Windows 7, the user must have administrator rights, which can be obtained through the command line or a text editor installed on the system.

How to change hosts in windows 7?
How to change hosts in windows 7?

Modifying hosts on the command line

Run the Command Prompt program on the system. To do this, go to the "Start" - "All Programs" - "Accessories". After that, left-click on the "Command Line" item. In the list of options that appears, select "Run as administrator". If required, enter the required password if you are using a Guest or Standard User account. You will see a black window in which you need to enter the command notepad C: / Windows / System32 / drivers / etc / hosts. After correct entry, the "Notepad" editor window will appear in front of you, which will be opened with administrator rights required to change and edit the document.

Modify the file as per your requirement. To add an unwanted resource to visit, enter a line like "127.0.0.1 site_address", where 127.0.0.1 blocks access to the site from the current computer, and "site_address" is the Internet address of the resource you want to block access to.

Opening a file directly from an editor window

You can also open the hosts file without using the command line. To do this, go to the "Start" - "My Computer" - "Local drive C:". Select Windows - System32 from the list of directories. In the list of programs that appears, find a file named Notepad (notepad.exe). Right click on the document and select "Run as administrator". If necessary, enter the password for the administrator account in the system and click "OK". The "Notepad" window will appear in front of you. Go to the "File" - "Open" menu.

Through the opened directory, go to the folder "Computer" - "Local drive 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 cannot find the hosts file in the specified folder, use the "All files" switch available in the lower right corner of the "Open" window immediately after the "File name" line.

You can also edit the hosts file under the administrator account through the "Explorer". Click "Start" - "My Computer" and then go to "Local Drive C:" - Windows - System32 - drivers - etc. If the file does not appear in the list, go to Tools - Folder Options. Select the View tab and then click Show Hidden Files. Click "OK" to apply the changes. After that, right-click on the hosts file and select the "Open with" menu.

Recommended: