csrutil

On this page 7

csrutil is the macOS command-line utility that reports and configures System Integrity Protection (SIP), the kernel-enforced security policy that prevents even the root user from modifying protected parts of the operating system. Its name comes from the Configurable Security Restrictions subsystem in the kernel, and it is one of the few Terminal tools whose most important commands work only from macOS Recovery.

In everyday Terminal and scripting work, administrators use csrutil mainly to check whether SIP is enabled, because many diagnostic scripts, kernel extensions and low-level developer tools behave differently when the protection is relaxed. Changing the policy is a deliberate, reboot-bound operation that weakens the security model of the Mac and should be reversed as soon as the task that required it is finished.

How csrutil controls System Integrity Protection

csrutil does not enforce anything itself; it reads and writes the SIP configuration that the kernel consults at boot. On Intel Macs the setting is stored in NVRAM as the csr-active-config variable, while on Apple silicon it is part of the LocalPolicy of each startup volume, which is signed by the Secure Enclave and tied to the boot security mode.

When SIP is active, the kernel blocks writes to locations such as /System, /usr (except /usr/local), /bin and /sbin, refuses code injection into Apple-signed processes, restricts runtime attachment by debuggers and limits the loading of unsigned kernel extensions. Since macOS Big Sur, the system volume is additionally a Signed System Volume (SSV), so a cryptographic seal protects it even beyond what SIP covers.

The following table summarizes the main protections that the SIP configuration governs and what happens when each one is relaxed.

Protection areaWhat it preventsEffect when relaxed
File system protectionWrites to system directoriesRoot can modify protected paths
Debugging restrictionsAttaching to protected processesTools such as dtrace gain full access
Kernel extension signingLoading unsigned kextsUnsigned drivers can load
NVRAM protectionChanges to boot variablesBoot arguments become writable
Base system integrityAltered system binariesModified components can run
Protections governed by the SIP configuration

csrutil commands and where they run

The utility has a small command set, and the key distinction is where each command may run. Read-only queries work in a normal user session, whereas any command that changes the policy must be issued from the Terminal in macOS Recovery, because the running system is not trusted to lower its own protection.

The table below lists the subcommands an administrator meets most often, together with the environment each one requires.

CommandPurposeWhere it runs
csrutil statusShows whether SIP is enabledNormal session or Recovery
csrutil disableTurns SIP off for the volumeRecovery only
csrutil enableRestores full protectionRecovery only
csrutil enable --without debugEnables SIP with one exceptionRecovery only
csrutil clearResets the configuration to defaultRecovery only
csrutil authenticated-root statusReports the sealed system volume stateNormal session or Recovery
Common csrutil subcommands

Partial configurations created with the --without flags produce a status line labeled custom configuration, which Apple describes as unsupported. On Apple silicon, disabling SIP also requires lowering the volume to Reduced Security in Startup Security Utility, and the command asks for an administrator user’s credentials before it writes the new policy.

How csrutil relates to other macOS security tools

csrutil is often confused with neighboring utilities in the same Terminal toolbox, but each one controls a different layer of the security model. SIP protects the operating system from modification, while Gatekeeper, code signing and quarantine attributes govern which third-party software may run.

ToolSecurity layerTypical question it answers
csrutilSystem Integrity ProtectionCan the system files be modified
spctlGatekeeper assessmentIs this app allowed to launch
codesignCode signatureWho signed this binary and is it intact
xattrExtended attributesIs the file marked as quarantined
bputilApple silicon boot policyWhich security mode is active
csrutil compared with related command-line tools

Because the layers are independent, disabling SIP does not disable Gatekeeper, and removing a quarantine attribute with xattr does not touch SIP. Troubleshooting is faster when the administrator first identifies which layer actually blocks the operation.

When changing SIP is justified

Legitimate reasons to change SIP are narrow and usually temporary. Most modern software, including security agents and drivers, now uses system extensions and DriverKit, which run outside the kernel and do not need SIP relaxed. The decision table below reflects typical requests that reach an administrator.

SituationRecommended actionReason
Checking a managed MacRun csrutil status onlyNo change is needed to read state
Kernel debugging or tracingUse --without debug temporarilyKeeps other protections active
Legacy unsigned kernel extensionReplace the software if possibleDisabling SIP exposes the whole system
Customizing system filesAvoid; the sealed volume resists itChanges break updates and the seal
Production or managed fleetKeep SIP fully enabledCompliance baselines require it
Decision guide for SIP changes

Mobile device management can report SIP status in inventory, and compliance frameworks such as the CIS Benchmark for macOS treat an enabled SIP as a mandatory control. Scripts that collect fleet data typically parse the output of csrutil status and flag any Mac that does not report enabled.

Limitations and common mistakes with csrutil

Most csrutil problems come from running commands in the wrong environment or from forgetting to re-enable protection. The list below covers the mistakes seen most often in support work.

  • Running csrutil disable in a normal session, which fails with an error about Recovery OS being required.
  • Assuming SIP is the reason a file cannot be edited, when the sealed system volume or file permissions are the real cause.
  • Leaving SIP disabled after a debugging session, which leaves the Mac open to persistent malware.
  • Parsing status output loosely in scripts, so a custom configuration is wrongly reported as fully enabled.
  • Expecting the change to apply instantly; the new policy takes effect only after a restart.

On Apple silicon, the setting is stored per startup volume, so a Mac with two macOS installations can have SIP enabled on one and disabled on the other. Administrators should therefore check status after booting into the specific volume they care about.

The simple explanation

Your Mac has a built-in guard that protects the core of macOS. It stops programs from changing important system files. It even stops the most powerful account on the computer. This guard is called System Integrity Protection.

csrutil is the switch panel for that guard. You can ask it whether the guard is on at any time. To turn the guard off, you must restart into a special recovery mode first. This extra step makes it hard for harmful software to switch the guard off quietly. The key point is simple: leave the guard on unless a specific task truly needs it off.

How it is used in practice

A systems engineer at a university research lab needs to trace file activity of a scientific application with dtrace, but the tool reports that it cannot attach to protected processes. On her Intel MacBook Pro, she first runs csrutil status in Terminal and confirms that SIP is fully enabled, which explains the restriction.

She restarts into macOS Recovery, opens Terminal and runs csrutil enable --without dtrace, which relaxes only the tracing restriction and keeps file system protection in place. After a restart, her tracing scripts run successfully and reveal that the application repeatedly rewrites a large cache file, which explains the slowdown that users reported.

When the investigation ends two days later, she returns to Recovery and runs csrutil clear followed by a restart. A final csrutil status check shows SIP enabled again, and the lab’s management system records the Mac as compliant in its next inventory report.