How to Quit Finder on Mac OS X

Quitting the Finder Application on macOS
Occasionally, a user might desire to completely exit the Finder application. This could be for tasks like clearing a busy desktop for a screenshot, or swiftly closing multiple Finder windows simultaneously.
Generally, the absence of a standard "Quit" option for the Finder is intentional. Terminating the Finder process can lead to unexpected consequences. For instance, all desktop icons will temporarily disappear.
While these icons are not permanently lost – they reappear upon restarting Finder – the effect can be startling for those unfamiliar with this behavior.
However, for users aware of the implications, the Finder can be exited using specific Terminal commands. These commands enable quitting Finder through the application switcher and add a "Quit" option to the Finder menu.
Adding the Quit Option
To implement this functionality on your Mac, begin by opening the Terminal application. It is located within the Applications > Utilities folder.
Once the Terminal is open, input the following command and press "Enter". Copying and pasting is acceptable to avoid typing errors.
defaults write com.apple.finder QuitMenuItem -bool true
Following this, restart the Finder by entering the subsequent command and pressing "Enter".
killall Finder
After executing these commands, the Finder will function like any other application, allowing you to quit it normally.
Reversing the Change
To revert to the default behavior and remove the "Quit" option, use the following command in the Terminal and press "Enter". Note the change from "true" to "false" at the end of the command.
defaults write com.apple.finder QuitMenuItem -bool false
Subsequently, execute the "killall" command again and press "Enter".
killall Finder
This will restore the system to its original state, removing the "Quit" option from the Finder menu.
Important Considerations
Remember that quitting the Finder will temporarily hide all icons present on your desktop. Restarting the Finder is necessary to restore their visibility.
Despite this, there are valid reasons for wanting to quit the Finder. These include obtaining a clean desktop for screenshots or enhancing privacy during presentations by concealing desktop contents.
Ultimately, this is a safe and potentially useful modification for macOS users.