MacOS Sierra - Enable option to open mac apps from anywhere

Mac gives fine-grained option to let the users decide what kind of apps can be installed. You can install from mac app-store, identified developers or from anywhere. The option can be accessed under Security & Privacy in System Preferences.

system preferences with anywhere available

Mac Sierra has disabled the ability to open Mac apps downloaded from anywhere. It is a good practice but some of the best apps are outside the mac app-store. The option to install from anywhere can be enabled by running the below command in the terminal.

sudo spctl --master-disable

system preferences with anywhere available

The same can be disabled after installing the required software because it is just good practice.

sudo spctl --master-enable