How to Hide Desktop Icons on Mac
Hiding desktop icons on a Mac can give you a cleaner workspace for screen sharing, presentations, or simply reducing visual clutter. macOS does not provide a desktop-icons switch in System Settings, but you can hide icons with a Finder setting for connected disks and a Terminal command for items on the desktop.
What You’ll Need
- A Mac running macOS, with access to Finder. Menu names may vary slightly between releases.
- For hiding files and folders already on the desktop, the Terminal app, included with macOS. You do not need to install anything.
Step-by-Step
- Choose what you want to hide. If the icons are for external disks, hard disks, CDs, DVDs, or connected servers, use Finder’s desktop-display settings. If you mean documents, folders, screenshots, or other files saved on the desktop, use the Terminal method below. These controls are separate.
- Hide connected drive and server icons through Finder. Click the desktop or open a Finder window, then choose Finder > Settings from the menu bar. On older macOS releases, this may be called Finder > Preferences. Open the General tab.
- Clear the items you do not want displayed. Under “Show these items on the desktop,” uncheck the relevant choices, such as Hard disks, External disks, CDs, DVDs, and iPods, or Connected servers. The change takes effect on the desktop. It hides those icons; it does not eject or disconnect the devices.
- Open Terminal to hide files and folders. Open Finder > Applications > Utilities > Terminal, or use Spotlight: press Command-Space, type “Terminal,” and press Return. Check that you are using your own Mac account and can restore the setting later.
- Enter the hide command. Type
defaults write com.apple.finder CreateDesktop -bool falseand press Return. This changes a Finder preference; it does not delete or move desktop files. Type the command exactly, including spaces and capitalization. - Restart Finder to apply it. In Terminal, enter
killall Finderand press Return. Finder will briefly disappear and reopen. The desktop icons should no longer be visible. If the command reports that no matching process was found, Finder may already have restarted; check the desktop before trying again. - Restore the desktop icons when you need them. Return to Terminal and enter
defaults write com.apple.finder CreateDesktop -bool true, then press Return. Runkillall Finderonce more. Your desktop files should reappear in their previous locations. Separately, return to Finder’s General settings and recheck any drive or server items you want displayed. - Use a temporary alternative if you prefer not to change Finder. Move desktop files into a folder in your home folder, or create a separate desktop space for a presentation. Moving files changes where they are stored; unlike the Terminal method, it is not simply hiding their icons.
Common Mistakes
- Expecting one setting to hide everything: Finder’s General checkboxes affect selected drive and server icons. They do not hide ordinary files and folders.
- Thinking hidden means deleted: The Terminal preference hides the desktop display. It does not erase files, remove them from storage, or make them private from other users who can access the account.
- Forgetting how to reverse the change: Save the restore command somewhere you can find it, or remember that changing
falsetotrueand restarting Finder brings icons back. - Typing only the preference command: The setting may not visibly change until Finder restarts. Run
killall Finderafter changing it. - Using the wrong kind of command: Do not add commands that delete files or use Terminal wildcards to clear the desktop. They are unnecessary and can cause data loss.
- Assuming the change is a privacy or security measure: Hiding icons only removes their visible desktop representation. Use account permissions and appropriate file-protection practices for sensitive data.
Tips
- For a presentation, hide icons before sharing your screen and check the shared display first. Desktop hiding does not conceal open Finder windows, notifications, or files you open during the presentation.
- If you only want fewer icons, organize files into a small number of folders instead of hiding the entire desktop.
- You can use Finder’s search or open your Desktop folder from your home folder to locate files while their icons are hidden.
- Hiding external-disk icons does not stop the Mac from using a connected drive. Eject a drive in Finder before physically disconnecting it.
- Keep the two methods separate in your notes: Finder checkboxes control selected device icons; the Terminal preference controls desktop files and folders.
Troubleshooting
The files are still visible after the command. Confirm the command was entered in Terminal without extra punctuation, then run killall Finder. If necessary, enter the hide command again and restart Finder. Make sure the icons are on the Mac’s actual desktop, not in an open Finder window or another app.
Only some icons disappeared. Check Finder > Settings > General for device icons. The Terminal setting is intended for desktop files and folders, while Finder’s checkboxes control supported device categories. A mounted drive can still appear in a Finder window or sidebar even when its desktop icon is hidden.
Finder does not seem to restart. Wait a few seconds, then click the desktop or open a Finder window. If needed, press Option-Command-Escape, select Finder, and click Relaunch. Avoid repeatedly running unrelated commands.
The icons do not return. Enter the restore command with true, then run killall Finder. If the desktop remains blank, check whether you are viewing the right user account or desktop space. You can also restart the Mac and check again.
Terminal displays an error. Check for misspellings, missing spaces, or smart quotation marks copied from formatted text. The commands shown do not normally require administrator authentication. Do not enter your password or approve additional changes in response to an unexpected prompt without understanding what it is requesting.
Frequently Asked Questions
Does hiding desktop icons delete my files?
No. The Finder preference hides their desktop display; the files remain stored on the Mac and reappear when you restore the setting.
Can I hide only one desktop file with this method?
No. The Terminal preference hides desktop files and folders as a group. To hide just one, move it into another folder or use Finder’s file organization options.
Will hidden icons stay hidden after restarting my Mac?
The Finder preference normally remains set until you change it. If icons return, verify the preference and restart Finder again.
Can I still open a file while its desktop icon is hidden?
Yes. Find it using Finder search or open the Desktop folder from your home folder, then open the file normally.
Does hiding an external drive icon eject the drive?
No. It only removes the desktop icon. The drive remains mounted unless you eject it through Finder.
Is there a built-in button to hide every desktop icon?
macOS Finder settings can hide certain connected-device icons. For ordinary desktop files and folders, the Finder preference changed through Terminal is a practical built-in option.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.