Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: how to set etc/hosts file in windows 7

28 Nov 2009   #1
simonc

windows7
 
 
how to set etc/hosts file in windows 7

I updated the Windows\System32\drivers\etc\hosts file to include static ip addresses of computers on my local network; just like I do it in Vista and XP. But now I tried to access the computers by name, it complains that host 'xyz' cannot be resolved. Why?

Simon


My System SpecsSystem Spec
.

28 Nov 2009   #2
torrentg

7600.20510 x86
 
 

Maybe you have Bonjour service on your pc? Check for mdnsresponder.exe in task manager.

Are you able to access the remote pcs by ip address?

make sure that

127.0.0.1 localhost

it the first entry in the hosts file. Must be first.
My System SpecsSystem Spec
28 Nov 2009   #3
logicearth

Windows 8.1 Pro (x64)
 
 

You should not need to do that unless the other computers are not Windows computers. Windows automatically resolves computer names to IPs for those that respond to NetBIOS. Are you positive the items added to the hosts file were in fact saved? Are they correct? The hosts file is no different in how it was in previous versions of Windows.
My System SpecsSystem Spec
.


28 Nov 2009   #4
torrentg

7600.20510 x86
 
 

It's cool to do that like for instance if you just want to type

router

or

bedroompc

in the browser url box and hit enter, you're there. Necessity? No. Simplicty? Yes.
My System SpecsSystem Spec
28 Nov 2009   #5
simonc

windows7
 
 

127.0.0.1 localhost
::1 localhost
192.168.0.110 pmachine
Bonjour Service is running under the 'Services' tab, how do i disable it?
My System SpecsSystem Spec
28 Nov 2009   #6
simonc

windows7
 
 

The other machine is a linux server
My System SpecsSystem Spec
28 Nov 2009   #7
simonc

windows7
 
 

Access to remote address by ip works fine
My System SpecsSystem Spec
28 Nov 2009   #8
zigzag3143

Win 8 Release candidate 8400
 
 

Quote   Quote: Originally Posted by simonc View Post
I updated the Windows\System32\drivers\etc\hosts file to include static ip addresses of computers on my local network; just like I do it in Vista and XP. But now I tried to access the computers by name, it complains that host 'xyz' cannot be resolved. Why?

Simon
Hi and welcome

how about a description or screenshot of the hosts file?

thanks

Kenn J++
My System SpecsSystem Spec
28 Nov 2009   #9
simonc

windows7
 
 

hi Kenn,

I posted earlier there are only 3 lines
127.0.0.1 localhost
::1 localhost
192.168.0.110 pmachine

file location is Windows\System32\drivers\etc\hosts
someone had mentioned that bonjour service messes up the hostname mapping, are you aware?
My System SpecsSystem Spec
28 Nov 2009   #10
simonc

windows7
 
 

http://pmachine/simon

Got a message DNS error - cannot find server from Google chrome
My System SpecsSystem Spec
Reply

 how to set etc/hosts file in windows 7




Thread Tools





Similar help and support threads
Thread Forum
error messages with windows defender, hosts file & microsoft essential
Hi, I can't open my hosts file. i want to block websites. when i right click on the hosts file to run as administrator i get . I cant open windows defender. When i click on it i get error message i can't install microsoft essentials. this just happened recently when i had a virus or malware...
System Security
Hosts file ignored and replaced with hosts.original
Hello. I am trying to use the hosts file. However both pings and web addresses still bypass the hosts file. I noticed that there is another file in the C:\Windows\System32\drivers\etc directory called 'hosts.original'. When ever I delete this file, it reappears seconds later. I have made sure that...
General Discussion
HOSTS File - Create a "Edit HOSTS file" Shortcut
How to Create a "Edit HOSTS file" Shortcut in Windows 7 and Vista The HOSTS file is a .txt file used in Vista and Windows 7 to map hostnames to IP addresses. Your computer checks this file first to resolve any network names to its corresponding IP address before it tries to check the Internet....
Tutorials
Hosts File : Use in Windows 7 / Vista
How to Access and Use the Hosts File in Vista, Windows 7, and Windows 8 This will give you the basics on how to use the Windows Hosts File, it's not very complicated but it's up to each individual to find additional information and put it to good use to suite your needs. To block a site this...
Tutorials
HOSTS file
I setup a hosts file in windows xp in order to use my website locally using the exact domain name by editing the hosts file by adding the line: 127.0.0.1 www.test.com This should resolve my local ip address for the test.com site and if apache is running, then it should load the website...
Network & Sharing

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 16:52.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App