Command to install third party softwares
- Open Terminal. Go to Applications > Utilities > Terminal.
- Paste the following command: sudo spctl --master-disable
- Enter your system password.
- Open Security & Privacy. Go to System Preferences > Security & Privacy.
- Go to the General tab. You will find the Anywhere option.
- Now you can open and launch apps from anywhere on macOS Mojave. Please note that this change will turn off Gatekeeper, and it is not suitable for most Mac users. Allowing applications from anywhere, such as unidentified developers, can make you Mac susceptible to some malware and junk software, which should be avoided by all its users. Unless you can deal with the risks above mentioned, please use this feature carefully.
Returning to Default Gatekeeper Security
Once you are done using an app (You will never use it anymore), you can always revert to the default strict Gatekeeper settings. This will allow only the applications downloaded from the Mac App Store or identified developers on the system.
- Open Terminal. Go to Applications > Utilities > Terminal.
- Paste the following command:
sudo spctl --master-enable, then press RETURN. - Enter your system password.
This will make macOS Gatekeeper return to a strict default state that prevents random applications from starting.