How to Hide Desktop Files in macOS 27 (Golden Gate)

Updated

Quickly hide and show your desktop files in macOS 27 (Golden Gate)

How to Hide Desktop Files in macOS 27 (Golden Gate)

First, let's open Terminal. Press command + space to open Spotlight, type Terminal, and press return.

To hide everything on your desktop, paste this command:

defaults write com.apple.finder CreateDesktop false; killall Finder

Give Finder a second to restart, and your desktop will look completely clean. Don't worry, your files are completely safe and haven't been deleted.

Whenever you want your files visible again, run the same command with true instead of false:

defaults write com.apple.finder CreateDesktop true; killall Finder

Typing those long commands every time gets tiring, so let's add two quick shortcuts to your zsh configuration file. Open the file by typing nano ~/.zshrc and pressing return.

Scroll to the bottom of the file and paste these two lines:

alias hide='defaults write com.apple.finder CreateDesktop false; killall Finder'
alias show='defaults write com.apple.finder CreateDesktop true; killall Finder'

To save your changes and exit, press control + O, press return to confirm, and then press control + X.

Next, reload your configuration so Terminal recognizes the new commands by running source ~/.zshrc.

Let's do a quick test to make sure everything works:

Type hide and press return to clear your desktop, and then type show and press return to bring your icons right back.

Even when your desktop is hidden, you can still open a Finder window and click Desktop in the sidebar to access all your files normally.