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:
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’.
Enable Gatekeeper from the Command Line of MacOS
Disable Gatekeeper from the Command Line in OS X Of course, you can also turn on Gatekeeper from the command line of 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.