macOS Sierra and Mojave Gatekeeper – Run Applications From Anywhere
With each release, Apple beefs up the security of its operating system — which is a good thing, but not appreciated by most power-users, or even semi-power-users.
Beginning with macOS Sierra, Apple changed Gatekeeper functions. Gatekeeper is something that acts a bouncer for your computer –– it only lets the user install Apple-trusted applications. From Apple support:
Gatekeeper is a new feature in Mountain Lion and OS X Lion v10.7.5 that builds on OS X’s existing malware checks to help protect your Mac from malware and misbehaving apps downloaded from the Internet.
Essentially, Gatekeeper ensures that the apps you install are safe. It does so by allowing only apps that are downloaded from the App Store or from “Identified Developers.” This is the default behavior of Gatekeeper.
You can view Gatekeeper options by going to System Preferences > Security & Privacy > General tab. (Screenshot below)
The screen gave you the option to change which applications can be downloaded: from the App Store, App Store and identified developers or from Anywhere
In macOS Sierra and above, the last option –– Anywhere –– is gone (shown in the screenshot below.)
However, if you are a true warrior and would like to change the default Gatekeeper behavior in Sierra, there is a quick fix for that, which involves running a simple command on terminal. Before you run this command, understand what it is: spctl is a command line tool to manage signing for Gatekeeper. This file modifies the information stored in /var/db/SystemPolicy. More information on spctl is available on Apple developer site.
Step 1: Launch the terminal. For the unfamiliar, terminal is a native Mac application that lets you run commands to change apps or the system behavior. To launch the terminal, launch spotlight and type “terminal.”
Step 2: Copy and paste this command on terminal and press enter: sudo spctl --master-disable
Enter the password when prompted on the terminal.
After you run had the command, you will see “Anywhere” option checked in Gatekeeper.
If you want to bring the default behavior back, simply run this command, which re-enables the security feature:
sudo spctl --master-enable