• 如何关闭OSX 10.11 SIP (System Integrity Protection)


    http://www.jianshu.com/p/0572336a0771

    注意:SIP功能是Apple在OSX上推出的系统完整性保护功能,对于普通MAC用户来说是一项安全保护功能,如果不了解他的作用请不要随意关闭,对于开发者来说,因为会使用到很多的第三方辅助工具(例如:Cocoapods、Homebrew),而这些工具可能会修改系统目录,在这些工具未推出适应OSX 10.11的版本时,有必要临时关闭SIP以确保开发工具的使用。

    建议:普通用户随意,开发者目前请谨慎升级,如果你已经升级,相信你可能需要恶心一阵了,因为有些工具没有更新不能正常使用或部分功能失效,甚至在关闭SIP后也有点问题,当然你只要耐心等待软件更新和网友的智慧或是自己动手丰衣足食,很多问题还是可以解决的。

    1.进入RecoveryHD

    开机按住Option键在出现的启动选择菜单中选择RecoveryHD进入恢复模式

    2.使用csrutil命令

    打开终端Terminal,键入csrutil可以显示该命令的使用方法

    usage: csrutil <command>
    Modify the System Integrity Protection configuration. All configuration changes apply to the entire machine.
    Available commands:
    
        clear
            Clear the existing configuration. Only available in Recovery OS.
        disable
            Disable the protection on the machine. Only available in Recovery OS.
        enable
            Enable the protection on the machine. Only available in Recovery OS.
        status
            Display the current configuration.
    
        netboot
            add <address>
                Insert a new IPv4 address in the list of allowed NetBoot sources.
            list
                Print the list of allowed NetBoot sources.
            remove <address>
                Remove an IPv4 address from the list of allowed NetBoot sources.

    可以看到在正常系统模式下中仅可以用status命令查询SIP状态

    csrutil disable

    csrutil enable

    3.常用参数

    • clear:清除配置设置,等同于完全开启SIP(仅在恢复模式下有效)
    • disable:关闭SIP(仅在恢复模式下有效)
    • enable:开启SIP(仅在恢复模式下有效)
    • status:查询SIP状态

    4.常用参数进阶

    除了可以完全关闭/打开,还可以进行单项和多项组合关闭相关功能,用法如下

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

    单项使用:

    sudo csrutil enable –without fs:Filesystem Protections disable
    sudo csrutil enable –without kext:Kext Signing disable
    sudo csrutil enable –without debug:Debugging Restrictions disable
    sudo csrutil enable –without nvram:NVRAM Protections disable
    sudo csrutil enable –without dtrace:DTrace Restrictions disable

    组合使用:

    sudo csrutil enable –without kext –without fs:Filesystem Protections and Kext Signing are disabled
    文/Tony鱼先森_iOSDev(简书作者)
    原文链接:http://www.jianshu.com/p/0572336a0771
    著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。
     
     
  • 相关阅读:
    利用杨辉三角和阶乘计算组合数
    验证字符串是否为回文数
    利用线性同余产生伪随机数+可变参数使用
    根据RandomStr.java:使用类型转换生成六位验证字符串。
    Java语言基础问题
    从命令行输入参数值,输出求和值。
    愚公移山_节选(伪代码)
    CodeForces
    CodeForces
    E
  • 原文地址:https://www.cnblogs.com/exmyth/p/5974881.html
Copyright © 2020-2023  润新知