GithubHelp home page GithubHelp logo

Comments (4)

laozl avatar laozl commented on July 17, 2024 1

后来 我把原来的 hosts文件文件重命名了,再从桌面新键一个hosts的文件,重新拖进原来的目录,神奇的一幕发生了 居然可以编辑了.好像是由于那个只读旁边的隐藏,我新创建的文件就没有这个隐藏的勾勾

from switchhosts.

jc77411 avatar jc77411 commented on July 17, 2024 1

需要修改用户权限

  1. 修改文件权限:找到hosts文件的位置(通常位于C:\Windows\System32\drivers\etc\hosts),
    在 属性 - 安全 选项卡中 编辑 按钮,然后选择你的用户名,勾选“写入”权限,点击“确定”保存更改
    这里可能还会遇到一个问题,没有权限更改权限(哈哈哈哈哈哈哈)
    2.用命令提示符授权:
    takeown /f C:\Windows\System32\drivers\etc\hosts
    icacls C:\Windows\System32\drivers\etc\hosts /grant administrators:F
    现在就可以更改了

from switchhosts.

atmImphy avatar atmImphy commented on July 17, 2024

@laozl 应该是Windows/System32/drivers/etc/hosts文件的属性是只读,需要去除只读属性的勾选才行
hosts 属性_2024-01-08_14-20

from switchhosts.

laozl avatar laozl commented on July 17, 2024

您好,这里已经是非只读了,但是还是不行哦 image

from switchhosts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.