
解决在windows上没有权限修改hosts文件的问题
发布日期:2021-05-06 23:59:27
浏览次数:40
分类:精选文章
本文共 1566 字,大约阅读时间需要 5 分钟。
github上的图片显示不出来,查了一下,发现是要改C:\Windows\System32\drivers\etc下的hosts文件,要在文件末尾增加以下内容:
# GitHub Start 140.82.113.3 github.com140.82.114.20 gist.github.com 151.101.184.133 assets-cdn.github.com151.101.184.133 raw.githubusercontent.com151.101.184.133 gist.githubusercontent.com151.101.184.133 cloud.githubusercontent.com151.101.184.133 camo.githubusercontent.com151.101.184.133 avatars0.githubusercontent.com199.232.68.133 avatars0.githubusercontent.com199.232.28.133 avatars1.githubusercontent.com151.101.184.133 avatars1.githubusercontent.com151.101.184.133 avatars2.githubusercontent.com199.232.28.133 avatars2.githubusercontent.com151.101.184.133 avatars3.githubusercontent.com199.232.68.133 avatars3.githubusercontent.com151.101.184.133 avatars4.githubusercontent.com199.232.68.133 avatars4.githubusercontent.com151.101.184.133 avatars5.githubusercontent.com199.232.68.133 avatars5.githubusercontent.com151.101.184.133 avatars6.githubusercontent.com199.232.68.133 avatars6.githubusercontent.com151.101.184.133 avatars7.githubusercontent.com199.232.68.133 avatars7.githubusercontent.com151.101.184.133 avatars8.githubusercontent.com199.232.68.133 avatars8.githubusercontent.com # GitHub End
但是增加了后发现,无法修改hosts文件,原因大概就是权限的问题。
在找到了比较方便的方法:
- 在随便什么位置新建hosts.txt文件。
- 把 C:\Windows\System32\drivers\etc 的 hosts 文件里的内容复制到这个hosts.txt文件中,然后进行自己想要的修改。
- 把 hosts.txt 的后缀去掉,因为 C:\Windows\System32\drivers\etc 里的 hosts 文件是没有后缀的。
- 把这个hosts文件放入 C:\Windows\System32\drivers\etc 中去覆盖原来的 hosts 文件,这样就大工告成啦~~
发表评论
最新留言
哈哈,博客排版真的漂亮呢~
[***.90.31.176]2025年03月20日 17时54分56秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
对模拟器虚假设备识别能力提升15%!每日清理大师App集成系统完整性检测
2019-03-06
使用Power BI构建数据仓库与BI方案
2019-03-06
pytest封神之路第二步 132个命令行参数用法
2019-03-06
Django认证系统并不鸡肋反而很重要
2019-03-06
快用Django REST framework写写API吧
2019-03-06
tep用户手册帮你从unittest过渡到pytest
2019-03-06
12张图打开JMeter体系结构全局视角
2019-03-06
学习版pytest内核测试平台开发万字长文入门篇
2019-03-06
Spring Cloud Stream如何消费自己生产的消息?
2019-03-06
Spring Cloud Alibaba基础教程:使用Nacos实现服务注册与发现
2019-03-06
Spring Boot 2.x基础教程:构建RESTful API与单元测试
2019-03-06
[UWP]浅谈按钮设计
2019-03-06
[UWP]分享一个基于HSV色轮的调色板应用
2019-03-06
[书籍]通过《番茄工作法图解》复习番茄工作法
2019-03-06
[UWP 自定义控件]了解模板化控件(1):基础知识
2019-03-06
UWP 自定义控件:了解模板化控件 系列文章
2019-03-06
[UWP]从头开始创建并发布一个番茄钟
2019-03-06
在 Azure 上执行一些简单的 python 工作
2019-03-06
WinUI 3 Preview 3 发布了,再一次试试它的性能
2019-03-06
前端页面,90°翻转图片、滚动鼠标滑轮放大缩小图片
2019-03-06