wiki:jazz/macOS

macOS 筆記

csrutil

  • 只能在 Recovery Mode 底下關閉
  • 意義:System Integrity Protection (SIP)
    jazzwang:~$ 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.
        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.
    

spotlight

  • 先確認 SIP 是 disable,再關閉 Spotlight
    jazzwang:~$ csrutil status
    System Integrity Protection status: disabled.
    jazzwang:~$ sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
    Password:
    
  • 參考:https://gist.github.com/adamstac/1249295

softwareupdate

  • Execute the following command to instruct a computer to download a full installer for macOS 12.2:
    softwareupdate --fetch-full-installer --full-installer-version 12.2
    

purge

  • Linux 底下可以用 vm.drop_caches=3 來清除不必要的記憶體
    sudo purge
    
Last modified 4 weeks ago Last modified on Jun 3, 2024, 8:47:19 AM