Hide Mac Desktop Icons for MacBook running macOS terminal

Опубликовано: 20 Март 2025
на канале: Noirth Security
241
0

When you want to hide your macOS / MacBook / Mac desktop icons, the easiest way is to create an alias so you can toggle this on and off via terminal anytime. First, if you use zsh do this:
nano ~/.zprofile
or if you use bash, do this:
nano ~/.bash_profile
And add in this (everything between the ###'s):
###
alias hidedesktop="defaults write com.apple.finder CreateDesktop false; killall Finder"
alias showdesktop="defaults write com.apple.finder CreateDesktop true; killall Finder"
###

You should be able to save this via Ctrl+O and then Ctrl+X.. reload your shell (Terminal) and type hidedesktop command. To your pleasure, the desktop is clear of your cluster.

Now, if you want to show your icons again - just type showdesktop.

Easy and now you can do this anytime. Share/like/sub/love/whatever