How to Access and Use the Windows Hosts File in Windows 7 and Vista

Block a Site

1) In the Windows start menu search box type "notepad" (without the quotes) right click the entry and select "Run as Administrator" then enter your user credentials for the UAC prompt and click yes to open notepad. In notepad at "File" select "Open" then browse to C:\Windows\System32\ drivers \etc in the window that opens select " All Files" then "hosts" then click "Open" to open the default Windows Hosts File location.
Hosts File : Use in Windows 7 / Vista-notepad-runas.jpg
Hosts File : Use in Windows 7 / Vista-uac_notepad.jpg
Hosts File : Use in Windows 7 / Vista-notepad_open.jpg
Hosts File : Use in Windows 7 / Vista-browse.jpg
Hosts File : Use in Windows 7 / Vista-select.jpg
2) The #1 snip below is the default Windows 7 Hosts File that opens, as you can see with the use of this ( # ) symbol, Windows does not "read" any of the default information in the file, so it's up to you whether to delete it all or not but it may be useful to leave it there for future reference.
Hosts File : Use in Windows 7 / Vista-hosts_info.jpg
3) If I wanted to block access to ebay.com, the first entry in the file would need to be 127.0.0.1 localhost on its own line, on the next line I would add 127.0.0.1 ebay.com with at least 1 space between the IP address and the host name; then back at "File" select "Save" then "Exit" to close notepad.

Hosts File : Use in Windows 7 / Vista-hosts_block.jpg
Hosts File : Use in Windows 7 / Vista-hosts_save.jpg
Hosts File : Use in Windows 7 / Vista-ebay.jpg

 

From:http://www.sevenforums.com/tutorials/78266-hosts-file-use-windows-7-vista.html?ltr=H

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值