Page Reader AI | How to Disable Gatekeeper from Command Line in Mac OS X


AI Summary Hide AI Generated Summary

Disabling Gatekeeper

For advanced users who find Gatekeeper overly restrictive, disabling it via the command line offers flexibility. The command sudo spctl --master-disable instantly disables Gatekeeper. Verification is possible using spctl --status, which should return 'assessments disabled'.

Enabling Gatekeeper

To re-enable Gatekeeper, use the command sudo spctl --master-enable. Again, spctl --status confirms the change, returning 'assessments enabled'.

Important Note

Most users should keep Gatekeeper enabled for security. Alternative methods for handling individual applications exist, such as the System Preference panel or the right-click "Open" option.

This command-line method works across various macOS versions, including Big Sur, Catalina, Mojave, High Sierra, and Sierra.

Sign in to unlock more AI features Sign in with Google

Though most Mac users will want to keep Gatekeeper enabled for security purposes, some advanced users find that Gatekeeper is overly zealous in preventing third party apps from being used in macOS and Mac OS X.

While it’s easy to turn off Gatekeeper through the System Preferences on a Mac, another option is to disable Gatekeeper by using the command line in Mac OS. This can be helpful for scripting purposes, configuration, remote management, and just for those who prefer to use the Terminal.

Disable Gatekeeper from the Command Line in Mac OS

Launch Terminal if you haven’t done so yet (/Applications/Utilities/) and issue the following command to turn off Gatekeeper:

sudo spctl --master-disable

Hit return and enter the admin password as usually required by sudo, and Gatekeeper will instantly be disabled. If you feel like confirming this, you can do so with the –status flag and the same command, like so:

spctl --status

This will report back ā€˜assessments disabled’ to indicate that Gatekeeper has been turned off. You will also find that the Gatekeeper Security preference panel will be set to ā€˜Everywhere’.

How to Enable Gatekeeper from the Command Line of Mac OS X

Of course, you can also turn on Gatekeeper from the command line of macOS / Mac OS X too by using the following command string:

sudo spctl --master-enable

Hit return and you can confirm the status again with –status:

$ spctl --status assessments enabled

Gatekeeper will be enabled again at it’s strictest setting. As disabling, the setting will carry through the GUI as well.

Again, most users should leave Gatekeeper turned on, and if need be, they can bypass it through the System Preference panel on a per-app basis, or by using the right-click ā€œOpenā€ trick.

The ability to disable Gatekeeper through Terminal has existed for quite a while now, and this tip applies to basically all modern Mac OS versions, including macOS Big Sur, Catalina, Mojave, High Sierra, and Sierra.

If you know of any other helpful tips or tricks associated with enabling and disabling Gatekeeper from the command line (or otherwise) do share them with us in the comments below.

Related

Was this article displayed correctly? Not happy with what you see?

Tabs Reminder: Tabs piling up in your browser? Set a reminder for them, close them and get notified at the right time.

Try our Chrome extension today!


Share this article with your
friends and colleagues.
Earn points from views and
referrals who sign up.
Learn more

Facebook

Save articles to reading lists
and access them on any device


Share this article with your
friends and colleagues.
Earn points from views and
referrals who sign up.
Learn more

Facebook

Save articles to reading lists
and access them on any device