How to Enable or Disable Gatekeeper on macOS

Bật tắt Gatekeeper Trên MacOS
Table of Contents

    Gatekeeper is one of the important security features of macOS, helping to prevent malware from accessing your Mac. By default,Applehas set up Gatekeeper to only allow users to install and run applications from the App Store or from trusted developers such as Adobe, Microsoft… However, in this article, Tech Tips Zone will guide you to turn on and off Gatekeeper on macOS to help you install software from other sources.

    Why Gatekeeper?

    Apple created Gatekeeper to not only protect your computer from malware, but also to create a safer environment when you browse the web and download applications. When you try to open software from an unknown source, you may receive a message like:

    • “The file name is corrupted and cannot be opened. You should move it to the Trash.”
    • “The file name cannot be opened because it comes from an unidentified developer.”

    This is a very necessary protection measure in today’s times, when there are so many threats from malware.

    How to install software of unknown origin

    If you need to install software that is not recognized by Gatekeeper or applications in development, there are a few things you can do:

    1. Manual Installation via Settings

    • Go toSystem Settings>Privacy & Security.
    • Scroll down and select theOpen Anywaybutton .

    Instructions for installing XAMPP on MacOS

    However, some other software still won’t let you install even if you select Open Anyway. In this case, you’ll need to disable Gatekeeper.

    How to Disable Gatekeeper on MacOS

    To disable Gatekeeper completely, simply follow these steps:

    1. OpenTerminal.
    2. Copy and paste the following command line into Terminal, then press theReturnkey :
      sudo spctl --master-disable
      
    3. Enter your Mac password when prompted and pressReturnagain.
    Enable Or Disable Gatekeeper On MacOS
    Enable Or Disable Gatekeeper On MacOS

    Confirm Gatekeeper Off

    To confirm that Gatekeeper was successfully disabled, you can:

    • Go toSystem Settings>Privacy & Security, scroll down to theSecurity section and you will see theAnywhereoption is selected.
    • If you don’t see this option, close and reopen theSystem Settingswindow .
    Enable Or Disable Gatekeeper On MacOS
    Enable Or Disable Gatekeeper On MacOS

    You can also check directly in Terminal with the following command:

    spctl --status
    

    If you seeassessments disabled, it means Gatekeeper is disabled.

    How to Turn Gatekeeper Back On Mac

    Once you have installed the necessary software, if you want to restore your computer’s protection to its default settings, turn Gatekeeper back on as follows:

    1. OpenTerminal.
    2. Copy and paste the following command line into Terminal, pressReturn:
      sudo spctl --master-enable
      
    3. Enter your Mac password and pressReturnagain.

    Check if Gatekeeper is enabled

    To confirm that Gatekeeper has been re-enabled, follow these steps.

    • Go toSystem Settings>Privacy & Security, scroll down to theSecuritysection and make sure that there are only 2 entries left:App StoreandApp Store and Identified developers.
    • If you still seeAnywhere, close and reopen theSystem Settingswindow .

    Check status with command in Terminal:

    spctl --status
    
    Check GateKeeper on/off status on macOS
    Check GateKeeper on/off status on macOS

    If you seeassessments enabled, that means Gatekeeper has been re-enabled.

    You can refer to the article:9 macOS Tricks New Mac Users Need to Know

    Conclude

    Gatekeeper is an important part of macOS’s security strategy and anti-piracy campaign. Enabling or disabling Gatekeeper on your Mac not only helps you install the software you need, but also protects your computer from malware threats. Always remember that safety and security are still the top priorities when using technology. Especially now that most data is digitized, it is very dangerous when sensitive information is leaked.

    Subscribe
    Notify of
    guest
    0 Góp ý
    Oldest
    Newest Most Voted
    Inline Feedbacks
    View all comments