How to Stop macOS from Automatically Quitting Applications

The Silent Shutdown

macOS utilizes a system feature known as Automatic Termination. To conserve memory and CPU resources, especially on MacBooks with limited RAM, the operating system will occasionally look at background applications that have no open windows. If macOS determines you haven’t interacted with an application like Preview or TextEdit in a while, it will automatically quit the application entirely without warning you. While this keeps the system running smoothly, it can be incredibly annoying if you use an application specifically for background tasks or if you rely on the application remaining in the Dock with a glowing dot to remind you to use it later.

Disabling Automatic Termination

To maintain absolute control over your running software and stop macOS from automatically quitting inactive applications in the background, you must disable the global Automatic Termination flag.

Apple does not provide a simple graphical toggle for this feature in System Settings; you must use a terminal command to override the default behavior. Open the Terminal application (you can find it in Applications > Utilities, or by searching for it in Spotlight). Click into the terminal window and type the following command exactly: defaults write -g NSDisableAutomaticTermination -bool true. Press Enter. This command writes a global override to the macOS defaults system, telling it to never terminate inactive applications. You will need to restart your Mac for the changes to fully take effect across all applications. From now on, an application will only quit when you explicitly press Cmd+Q or select Quit from the menu bar.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.