Install on macOS Sierra and higher
The Gatekeeper settings can be found in System Preferences > Security & Privacy > General. The Gatekeeper options are located beneath “Allow apps downloaded from:” with the choice of “Anywhere” missing.
The “Anywhere” setting can be restored to Gatekeeper in Sierra (and higher) with a Terminal command. Terminal is a program that comes installed on all Macs. You will find it in your Applications > Utilities folder
First, quit System Preferences if it’s open and then open a new Terminal window. Enter the following command and press Enter. Now enter your admin password when prompted. Please, notice that you will not get any visual feedback when you enter your password.
Now, relaunch System Preferences and go back to the Gatekeeper settings. You’ll now see that “Anywhere” has been restored. Click the padlock in the lower-left corner to enter your password and make changes, then select “Anywhere” from the list of Gatekeeper options. The security feature will no longer warn you about apps from unidentified developers.
Restore Gatekeeper Settings to Default
If you’ve enabled the “Anywhere” option by using the Terminal command above and later want to remove it, you can go back to Terminal and run the following command instead:
This way, you can ensure better security for any new users of the Mac.