everyday mac tools

Add a Quit command to the Finder

· 5 min read

The Finder is the one app on a Mac with no Quit command, because it draws your desktop and handles the file operations other apps hand off to it. One preference key adds Quit Finder to the Finder menu, with Command-Q beside it. Quitting closes every Finder window and clears the desktop icons; clicking the Finder icon in the Dock brings it straight back.

Add the command

defaults write com.apple.finder QuitMenuItem -bool true; killall Finder

killall Finder restarts Finder so the menu bar is rebuilt with the new item. Your Finder windows close and the desktop redraws; other apps are untouched. Open the Finder menu and Quit Finder is at the bottom, with Command-Q next to it, exactly where it sits in every other app.

What quitting the Finder actually does

  • Every Finder window closes, including any that were minimized.
  • The desktop icons disappear. Your wallpaper stays where it is.
  • The Dock stays, with the Finder icon on it. Every other running app carries on.
  • Clicking the desktop stops doing anything, because there is no desktop layer to click.
  • Anything that asks Finder to do something (an app revealing a file, an installer, a drag to AirDrop) starts it again automatically.

It does not free any meaningful amount of memory, it does not make the Mac faster, and it does not close your documents. Treat it as a way to clear the screen, not as maintenance.

Getting the Finder back

Four routes, all of them quick:

  1. Click the Finder icon in the Dock.
  2. Reveal a file in Finder from another app, which relaunches it and opens the folder.
  3. Run open -a Finder in Terminal.
  4. Press Command-Option-Escape for Force Quit, where Finder is listed with a Relaunch button instead of Force Quit.

The Force Quit route works whether or not you have added the menu item, and so does a shortcut worth knowing on its own: hold Option while you right-click or Control-click the Finder icon in the Dock, and Relaunch appears in the menu. Relaunching is the useful half of quitting. It clears a Finder window that has stopped responding, an external drive that refuses to eject cleanly, or a sidebar that has got into a strange state, without you needing a Quit command at all.

Why people want it, and whether it is the right fix

Two reasons come up nearly every time.

Hiding desktop icons before a screen share or a screenshot. Quitting Finder does hide them, along with your Finder windows. But recent macOS versions have a supported setting for exactly this: System Settings, Desktop & Dock, in the Desktop and Stage Manager section, where a Show Items control has an On Desktop checkbox. Turn it off and the icons go, with everything else left alone. Turning on Stage Manager hides them too. Both are better than quitting Finder because you can put them back without relaunching anything.

Closing every Finder window at once. Command-Q does it in one keystroke, which is the appeal. So does Option-Command-W, Close All Windows, which is standard across macOS apps and does not quit anything.

If either of those is your actual goal, macOS already covers it. The case for adding Quit Finder is different: you want Finder to behave like the rest of your apps, so that the Command-Q reflex does not silently do nothing when Finder happens to be in front.

What can go wrong

Nothing serious, but there are three things worth knowing before you add it.

  • Command-Q is muscle memory. You will quit Finder without meaning to, and the first time the desktop empties it is briefly alarming. Everything comes back exactly as it was, icon positions included.
  • Copies and moves you started in Finder belong to Finder. Do not quit while a progress bar is running.
  • A few workflows expect Finder to be running: a script that talks to it, a Services item, an app that reveals files. They will relaunch it, but you may notice the pause.

The setting is per user, so adding it to your account does not change anything for anyone else who logs in to the same Mac.

Turn it off again

defaults write com.apple.finder QuitMenuItem -bool false; killall Finder

Or remove the key entirely, which comes to the same thing:

defaults delete com.apple.finder QuitMenuItem; killall Finder

If Terminal reports that the domain or the key pair does not exist, the key was never set and there is nothing to undo. What defaults write does and how to undo one safely covers reading a value before you change it, which is the habit that makes any of this safe to experiment with.

The switch version

This is one of a group of Finder settings that exist but have no interface: quit with Command-Q, hidden files shown, the full path in the title bar, folders sorted above files. Mainspring (https://trymainspring.com/) carries quit Finder with Cmd-Q as a labeled power-up alongside the others, records the previous value before it writes, and reverts in a click. It also bundles them as a recipe you can apply and undo as a set, which is the sensible way to try four Finder changes at once and keep only the ones you like.

For this single key, the command above is shorter than installing anything. The two related changes people usually make at the same time are showing hidden files in Finder and showing the full path in the title bar and the path bar.

Questions

Does quitting the Finder log me out or close my apps? Neither. Finder is an app like any other. Your documents, browser tabs and background processes carry on, and the Dock stays exactly where it was.

Can I quit the Finder without adding the menu item? Yes. osascript -e 'tell application "Finder" to quit' in Terminal has the same effect. killall Finder is different: it restarts Finder rather than leaving it quit, which is usually what people actually want.

Do my desktop icons come back in the same places? Yes. Icon positions are stored per folder, so relaunching Finder restores the desktop as it was. Hiding the icons through System Settings does not move anything either; the files stay in your Desktop folder throughout.

Will a macOS update remove the Quit item? Preferences in your home folder normally survive updates. If the menu item goes missing after a major upgrade, run the same command again and Finder rebuilds its menu on restart.