【macOS】维护

Posted by 西维蜀黍 on 2022-02-27, Last Modified on 2023-05-02

重置SMC

https://support.apple.com/zh-cn/HT201295

NVRAM / PRAM

NVRAM(非易失性随机访问存储器)是一小部分内存,Mac 使用这些内存来储存某些设置并对其进行快速访问。PRAM(参数 RAM)储存着类似的信息,且 NVRAM 和 PRAM 的重置步骤相同。

可储存在 NVRAM 中的设置包括音量、显示屏分辨率、启动磁盘选择、时区,以及最近的内核崩溃信息。储存在 NVRAM 中的设置取决于您的 Mac 以及与这台 Mac 搭配使用的设备。

Panic Debug

  • ~ /Users/shiwei/Library/Logs/DiagnosticReports

  • /Library/Logs/DiagnosticReports

    • The panic report should have “panic” in the file name.
  • Open the Console app from the Application -> Utilities, you will see the log files.

    cat /var/log/system.log | grep crash
    

Enable/Disable SIP

How To Disable SIP

Boot macOS into Recovery Mode. To do this, restart your computer and hold down the Command+R (⌘+R) keys simultaneously when you hear the boot chime.

Once in Recovery mode, open a Terminal window from the Utilities drop-down menu at the top of the screen.

Type the following into the Terminal window: csrutil disable

Press the Enter/Return key, and you’ll see a message stating that System Integrity Protection has been disabled and that the machine needs to restart for changes to take effect.

Now, restart your Mac and SIP should be disabled. You can now install your software without any conflict from this service.

How To Re-enable SIP

Once you have installed the software, restart in macOS Recovery mode again with the Command+R (⌘+R) keys, then open a Terminal window and type: csrutil enable

Press the Enter/Return key, and you’ll see a message stating that System Integrity Protection has been enabled and that the machine needs to restart for changes to take effect.

Restart your Mac and SIP should now be working again as expected.

Reference