简体   繁体   English

通过Mac OS X Parallels在Windows 7中的Hosts文件被忽略

[英]Hosts file in Windows 7 through Mac os X Parallels is being ignored

I'm using Mac os X with Parallels. 我正在将Mac os X与Parallels一起使用。

I am trying to set up a hosts file in windows. 我正在尝试在Windows中设置主机文件。

The Hosts file in windows is ignoring my every attempt to update it. Windows中的Hosts文件忽略了我进行任何更新的尝试。

127.0.0.1  www.altavista.com
google.com test
10.37.129.2   localhost

Any of these will not work when I try and ping test, localhost, or www.altavista.com 当我尝试对ping测试,localhost或www.altavista.com进行ping操作时,这些方法均不起作用

I have tried the following : 我尝试了以下方法:

Deleting Hosts file, and recreating the file with "Edit as Administrator" while opening Notepad. 删除主机文件,并在打开记事本时使用“以管理员身份编辑”重新创建文件。

Clearing my cache, resetting my router, and rebooting Windows. 清除缓存,重置路由器,然后重新启动Windows。

My host file is located in C:\\windows\\system32\\drivers\\etc\\hosts 我的主机文件位于C:\\windows\\system32\\drivers\\etc\\hosts

How is this being ignored? 如何忽略它?

Alright, so in Windows 7, everytime I saved the file, even though there was explicitly no extension set, it still set one, and wouldn't tell me. 好了,所以在Windows 7中,每次我保存的文件,即使有明确没有扩展集,它仍然设置一个,也不会告诉我。

So I went into Dos and did this : 因此,我进入Dos并执行以下操作:

rename hosts.txt hosts

Then make sure you reboot your Virtual Host or Windows . 然后确保重新启动虚拟主机或Windows。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM