系统 hosts 锁定了,显示简介里的锁也被置灰了

2023 年 3 月 11 日
 ImmerTry

如题,有遇到过的友友吗?

2350 次点击
所在节点    macOS
9 条回复
shenfu1991
2023 年 3 月 11 日
用命令行试试
ihwbunny
2023 年 3 月 12 日
命令解锁就是喽,后面肯定有人贴出命令
Bodo
2023 年 3 月 12 日
`sudo chflags -hv noschg /etc/hosts`
leeuu
2023 年 3 月 12 日
拉到桌面弄完再粘贴回去
ImmerTry
2023 年 3 月 12 日
@leeuu 不行拉到桌面拉回去 连同原来的文件一起被锁住了
ImmerTry
2023 年 3 月 12 日
@Crump 这个我是试过 没能解决
linyichang
2023 年 3 月 13 日
sudo chflags nouchg /etc/hosts
sudo chflags noschg /etc/hosts
linyichang
2023 年 3 月 13 日
锁住 hosts
sudo chflags uchg /etc/hosts
sudo chflags schg /etc/hosts

解锁 hosts
sudo chflags nouchg /etc/hosts
sudo chflags noschg /etc/hosts
ImmerTry
2023 年 3 月 15 日
@linyichang 谢谢已经 成功了
https://zhuanlan.zhihu.com/p/464572162 在此之前 我参考了这个再执行的

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://v2ex.xtra.eu.org/t/923210

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX