mac 关闭sip 保护系统

最近在mac上操作文件发现提示

chmod: Unable to change file mode on /usr/bin/cc: Operation not permitted
  • 1

发现是El Capitan(10.11) 加入了Rootless机制,很多系统目录不再能够随心所欲的读写了,即使设置 root 权限也不行。

以下路径无法写和执行

/System
/bin
/sbin
/usr (except /usr/local)
  • 1
  • 2
  • 3
  • 4

加入这个机制主要是为了防止恶意程序的入侵,更多我们可以查看官网

https://developer.apple.com/videos/play/wwdc2015/706/

如何关闭

重启按住 Command+R,进入恢复模式,打开Terminal

csrutil disable
  • 1

如何开启

重启按住 Command+R,进入恢复模式,打开Terminal。

csrutil enable

猜你喜欢

转载自blog.csdn.net/m0_37827630/article/details/78055287