加入收藏 | 设为首页 | 会员中心 | 我要投稿 | RSS
您当前的位置:首页 > 本地

如何修改windows系统的host文件

时间:2024-03-07 11:21:55  来源:http://www.gzrxw.net  作者:admin

一、如何修改windows系统的host文件

首先我们打开我的计算机

然后我们进入C盘的C:\Windows\System32\drivers\etc这个目录下面找到host这个文件

双点击打开,选择计算本打开,这时可能会用到管理员权限这个时候选择管理员权限运行就好了

打开之后再里面添加你要修改的内容就好了,我这里是按照android studio修改的host内容

最后然后保存下来就可以了。

二、如何修改HOST文件 本机DNS修改方法

我们找到HOST文件地址

XP的在C盘 C:WINDOWSsystem32driversetc 目录下的 hosts文件

我们用记事本打开后 修改

HSOT源文件为

# Copyright (c) 1993-1999 Microsoft Corp.

#

# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.

# This file contains the mappings of IP addresses to host names. Each

# entry should be kept on an individual line. The IP address should

# be placed in the first column followed by the corresponding host name.

# The IP address and the host name should be separated by at least one

# space.

#

# Additionally, comments (such as these) may be inserted on individual

# lines or following the machine name denoted by a '#' symbol.

#

# For example:

#

# 102.54.94.97 rhino.acme.com # source server

# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost

我们在后面添加 www.iqshw.com 的 ip 刚刚朋友帮你ping到的IP是218.93.210.178 我们在最后一段那添加一句

218.93.210.178 www.iqshw.com (注意IP与域名之间有空格)

三、修改本机host文件怎么弄!

首先告诉你图片信的含义:

域名指向是指把当前域名指向到别的网站、网站下的目录、IP地址下的目录,你的HOST可能被修改为指向本地的局域网内的服务器,即192.168.0.136的机器,如果你要修改的话,可参照如下方法:

用记事本打开后 修改为

# Copyright (c) 1993-1999 Microsoft Corp.

#

# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.

# This file contains the mappings of IP addresses to host names. Each

# entry should be kept on an individual line. The IP address should

# be placed in the first column followed by the corresponding host name.

# The IP address and the host name should be separated by at least one

# space.

#

# Additionally, comments (such as these) may be inserted on individual

# lines or following the machine name denoted by a '#' symbol.

127.0.0.1 localhost

四、如何修改Android手机的Hosts文件

具体操作过程是:

先通过各种方法让Android手机获取Root权限,之后运行Root Explorer管理器,进入可写状态,找到/system/etc/hosts的文件,将其权限修改为可写。

打开Terminal Emulator,输入su,进入root模式,输入 vi /system/etc/hosts 命令,按i进入编辑模式,之后将用户电脑上的hosts文件内容也输入进去。

Android虚拟终端下当vi在编辑模式时,按下“确定”键(Trackball),再按下虚拟键盘上的“1”,就可以退出编辑模式了(CTRL+[),这个时候使用:wq就可以保存退出了。

之后重启手机即可。

来顶一下
返回首页
返回首页
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表
推荐资讯
相关文章
    无相关信息
栏目更新
栏目热门