一、Windows10中host地址。
c:\windows\system32\drivers\etc\hosts
其他系統中的位置。
- Windows操作系統(Windows XP/7/8/10): C:\windows\system32\drivers\etc\hosts
- Linux(Redhat, CentOS, Debian, Ubuntu等): /ets/hosts
- Android: /system/etc/hosts
- Mac OS X: /private/etc
二、widows下修改完需要在cmd中用命令刷新緩存記錄。
ipconfig /flushdns
參考:修改hosts文件啟用自定義域名訪問測試服務器上的網站
如何在hosts文件添加自己想要解析的網站?及修改hosts的作用
HOW TO EDIT LOCAL HOST FOR TESTING WEB SITES
