Unable to open Anywhere option from Gatekeeper in order to open apps not from Mac App Store I was following this guide to open a Mac app from an unidentified developer.
So I open Terminal and enter the following code to get the Anywhere option
sudo spctl --master-disable

This leads to the following output
objc[7234]: Class SPExecutionPolicy is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[7234]: Class AppWrapper is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[7234]: Class AppWrapperPolicyResult is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[7234]: Class AppWrapperPolicy is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[7234]: Class SPLog is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[7234]: Class MIS is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[7234]: Class SPExecutionHistoryItem is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[7234]: Class SPExecutionPolicyItem is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[7234]: Class SPDeveloperPolicy is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[7234]: Class GKScanResult is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.

but doesn't seem to enable the option in System Preferences.

So how can I enable &quot;Allow apps downloaded from Anywhere&quot; via Terminal? Using macOS Big Sur Ver 11.1
If you download an application from the internet, then the following steps can be taken to open the application. Here the Startup application is used as an example.
I downloaded the Startup application from the SourceForge project Startup for rEFInd. Here is my Downloads folder.

Note: In Finder preferences, I have Show all filename extensions checked off.


When I double clicked on Startup.app, I received the following popup.

I selected the Cancel button. Next, I opened the Security &amp; Privacy pane of the System Preferences application, as shown below.

Here, I selected Open Anyway and the the following popup occurred.

Here, I selected Open and the application opened.

The above steps only had to be done once. Afterwards, the application could be opened by simply double clicking on the icon.

Note: The above steps did not remove the com.apple.quarantine extended attribute placed on any files or folders.
How to Avoid the Above Steps
When a file is downloaded, the extended attribute named com.apple.quarantine is placed on the file. This is what initially kept the Startup the application from opening. The following steps can be taken to remove the com.apple.quarantine extended attribute from the application.

If you want to test these steps, then you will probably what to put any existing Startup application in the trash, and download a new copy of the application.

Right click the application in the Finder window and select New Terminal at Folder, as shown below.

This will open a Terminal application window, as shown below.

Enter the following command, as shown in the image below.
xattr -rd com.apple.quarantine .


Next, close the Terminal application window. Now you can open the application normally.