mac关闭sip系统完整性保护
mac上系统完整性保护(System Integrity Protection, SIP)是 macOS 中的一项安全功能,用于防止系统文件和目录被修改或篡改,即使是具有 root 权限的用户也无法进行这些操作。
env
- macbook-pro 16
1.关闭sip(系统完整性保护)
intel
- 1.重启系统,按住 Command + R 进入恢复模式
- 2.点击顶部菜单栏 实用工具 中的 终端
- 3.输入以下命令来禁用 SIP 保护机制, csrutil disable - [y/n],输入y执行后输出以下信息表示禁用成功,Successfully disabled System Integrity Protection. Please restart the machine for the changes to take effect.
- 4.再次重启系统即可 reboot
arm
- 1.重启电脑,M系列芯片长按开机键即可进入
- 2.点击顶部菜单栏中的终端
- 3.输入命令关闭 SIP 机制:csrutil disable
如弹出以下信息则表示禁用成功:Successfully disabled System Integrity Protection. Please restart the machine for the changes to take effect. - 4.再次重启即可 reboot
2.恢复系统完整性保护 SIP
恢复系统完整性保护 (SIP)
进入恢复模式:
- 重启 Mac,并在开机时按住
Command (⌘) + R
键,直到看到苹果标志或旋转的地球图案。 - 进入恢复模式后,选择“实用工具”中的“终端”
- 重启 Mac,并在开机时按住
启用 SIP:
- 在终端中输入以下命令并回车:
csrutil enable
及其启用/禁用的详细指南 - 重启 Mac,SIP 将重新启用
- 在终端中输入以下命令并回车:
检查 SIP 状态:
- 在正常的 macOS 系统中打开终端,输入
csrutil status
,查看 SIP 是否已启用
- 在正常的 macOS 系统中打开终端,输入
请注意,SIP 是为了保护系统文件和进程免受未经授权的访问和修改,建议在不需要进行特殊操作时保持启用状态
csrutil help
csrutil --help
csrutil: invalid command --help
usage: csrutil <command>
Modify the System Integrity Protection configuration. All configuration changes apply to the entire machine.
Available commands:
clear
Clear the existing configuration.
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.
authenticated-root
status
Show the current authenticated root setting.
disable
Allow booting from non-sealed system snapshots. Only available in Recovery OS.
enable
Only allow booting from sealed system snapshots. Only available in Recovery OS.