Date
Sep. 8th, 2024
 
2024年 8月 6日

Post: OS X: csrutil

OS X: csrutil

Published 12:06 Jun 01, 2016.

Created by @ezra. Categorized in #Programming, and tagged as #macOS.

Source format: Markdown

Table of Content

El Capitan 加入了 Rootless 机制, 不再能够随心所欲的读写很多路径真是很难过。

Rootless 机制将成为对抗恶意程序的最后防线

要关闭 Rootless, 需要进入恢复系统。开机时按住 option 选择恢复磁盘 (或在开机时按住 command + R), 在菜单中找到并打开 Terminal

csrutil disable

然后重启即可。

如果要恢复默认:

csrutil enable

csrutil

csrutil enable [--without kext | fs | debug | dtrace | nvram][--no-internal]

禁用:

csrutil disable
csrutil enable --without kext --without fs --without debug --without dtrace --without nvram)
  • B0: [kext] 允许加载不受信任的 kext (与已被废除的 kext-dev-mode=1 等效)
  • B1: [fs] 解锁文件系统限制
  • B2: [debug] 允许 task_for_pid() 调用
  • B3: [n/a] 允许内核调试 (官方的 csrutil 工具无法设置此位)
  • B4: [internal] Apple 内部保留位( csrutil 默认会设置此位, 实际不会起作用。设置与否均可)
  • B5: [dtrace] 解锁 dtrace 限制
  • B6: [nvram] 解锁 NVRAM 限制
  • B7: [n/a] 允许设备配置
Pinned Message
HOTODOGO
The Founder and CEO of Infeca Technology.
Developer, Designer, Blogger.
Big fan of Apple, Love of colour.
Feel free to contact me.
反曲点科技创始人和首席执行官。
程序猿、设计师、奇怪的博主。
苹果死忠、热爱色彩斑斓的世界。
如有意向请随时 与我联系