---
title: "解决无法修改hosts文件的方法"
author: "wing.wang"
date: "2010-03-24T20:19:12Z"
tags: []
categories: ["操作系统"]
slug: "hosts"
draft: false
lastmod: "2010-03-24T20:19:12Z"
id: 624016
url: "https://wing-wang.iteye.com/blog/624016"
---

解决无法修改hosts文件的方法
在cmd中输入

echo y|cacls %windir%\system32\drivers\etc\hosts /g everyone:f
attrib -r -a -s -h %windir%\system32\drivers\etc\hosts