Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.
Many macOS apps have a Preferences menu that allows you to change their settings. You can also change Mac options in the System Preferences panel.
But not all settings are available in the Preferences or Settings dialog boxes. That’s why you need to know about the defaults Terminal command. This allows you to change hidden settings for apps and the Mac system using the command line.
Today, we’ll show you some handy hidden settings on your Mac you can change using the defaults command.
What Are Property Lists?
App settings and user preferences are stored in files called property lists (PLIST files). But manually editing PLIST files is not recommended. The defaults command allows you to safely change the settings and preferences in PLIST files without digging into them by hand.
PLIST files are stored in two locations on your Mac. User PLIST files are stored in ~/Library/Preferences/. The tilde (~) character represents your home folder. System-wide settings are stored in /Library/Preferences/.
Names of PLIST files are domains and generally belong to individual apps. For example, the domain for Clean My Mac 3 is com.macpaw.CleanMyMac3. So the property list file for Clean My Mac 3 is com.macpaw.CleanMyMac3.plist.
View User Preferences
You can view the user preferences for an app using the defaults command. You may want to do this before making changes to preferences. That way you know what the original options were in case you want to go back to them.
To view all user preferences, open the Terminal (in the /Applications/Utilities/ folder), type the following command at the prompt, and press Enter.
The output list displays in the Terminal window. This will be quite long because it includes all settings for every app. You can also send the output to a text file if you want to save it. Simply add > [path and file name] to the end of the command. For example, to save all user preferences to a file on the desktop, type the following command and press Enter.
defaults read > ~/Desktop/userpreferences.txt
You may not care about the user preferences for all apps on your Mac. Thankfully, you can also view the user preferences for an individual app using its domain and PLIST file. For example, to view the preferences for the Encrypto app, type the following command.
defaults read com.macpaw.Encrypto
As above, you can add a path and filename as above to save it to a file if you like.
Applying Changes Using the Defaults Command
If you change a setting for a currently running app using the defaults command, the app won’t see the change. It may even overwrite what you did. Thus, you should close an app before changing its settings with the defaults command.
In the case of the Dock and Finder, you must restart them after making a settings change. To restart the Dock, use the following command in a Terminal window:
To restart Finder, use the following command:
For the preferences listed below, we include the appropriate killall command where needed. That way, in most cases you can simply copy the command and paste it into a Terminal window (right-click at the prompt and select Paste).
1. Always Show Hidden Files in Finder
By default, Finder doesn’t display all files. Some files are hidden from view—mostly files you don’t need to deal with. Hidden files have a dot at the beginning of the file name. You can also hide your own files using the same method.
To always show hidden files in Finder, enter the following command at the prompt in a Terminal window.
defaults write com.apple.finder AppleShowAllFiles TRUE && killall Finder
To hide all hidden files again, run the same command but replace TRUE with FALSE:
defaults write com.apple.finder AppleShowAllFiles FALSE && killall Finder
2. Always Show the Expanded Print Dialog by Default
To get additional printing options on a Mac, you must click Show Details on the Print dialog box. If you use these additional printing options often, you can change a setting to show the fully expanded Print dialog box every time.
Enter the following command at the prompt in a Terminal window.
defaults write -g PMPrintingExpandedStateForPrint -bool TRUE
To go back to the default dialog box without the additional options, enter the same command, replacing TRUE with FALSE:
defaults write -g PMPrintingExpandedStateForPrint -bool FALSE
3. Change the Default Screenshots Format and Location
Your Mac’s system includes several handy shortcuts for taking screenshots, like Cmd + Shift + 3 to capture the entire screen and Cmd + Shift + 4 to select an area to capture.
We’ve covered how to use the defaults command to change defaults for screenshots, like the default file format for screenshots and where they’re automatically save to.
4. Drag Dashboard Widgets to the Desktop
Many people either forget or don’t know about the Mac Dashboard. It’s hidden behind a keyboard shortcut (F12). The widgets on the Dashboard are like gadgets in Windows, and include items like a clock, weather panel, and calculator.
You can move widgets from the dashboard to your desktop using a combination of a defaults command and the Dashboard shortcut.
5. Get Rid of the Dashboard
If you don’t use the Dashboard at all, you can get rid of it. If you have an older Mac with a small amount of memory, you might want to disable the Dashboard so it’s not using resources in the background.
Enter the following command at the prompt in a Terminal window:
defaults write com.apple.dashboard mcx-disabled -boolean YES && killall Dock
To bring the Dashboard back, simply re-run the above command, replacing YES with NO:
defaults write com.apple.dashboard mcx-disabled -boolean NO && killall Dock
6. Completely Hide Desktop Icons
You may find your Mac’s desktop getting cluttered with files and folders, especially if you have a smaller screen. You can hide all the icons on your desktop to relieve yourself from the clutter. The files and folders are still available in the Desktop folder in Finder.
We covered how to hide the desktop icons as part of cleaning up your Mac desktop to increase productivity.
7. Show System Info on the Login Screen
You can view system information (computer name, macOS version, and IP address) on the login screen by clicking the clock, but this feature is not on by default.
To enable it, enter the following command in a Terminal window:
sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName
To disable this feature, enter the following command:
sudo defaults delete /Library/Preferences/com.apple.loginwindow AdminHostInfo
8. Reset Dock Customizations
When you first set up a Mac, the Dock contains a stock set of icons. These show at the default size at the bottom of the screen. You can customize the Dock, including adding app icons to the Dock, relocating it to a different position on the screen, and having the Dock automatically hide.
An easy way to quickly reset the Dock to its default settings is to enter the following command in the Terminal window:
defaults delete com.apple.dock && killall Dock
9. Add the Quit Option to Finder
Did you know that you can actually quit Finder? By default, there’s no Quit option in Finder, but you can add one.
Enter the following command in the Terminal:
defaults write com.apple.finder QuitMenuItem -bool TRUE && killall Finder
To remove the Quit option, repeat the above command, replacing TRUE with FALSE:
defaults write com.apple.finder QuitMenuItem -bool FALSE; killall Finder
10. Show One App at a Time
You can have many apps showing on your desktop at a time. But if you work on a small screen, it might be useful to only show one app at a time. With the single-app mode enabled, opening a minimized app will hide all other open apps.
Enter the following command in a Terminal window to try it:
defaults write com.apple.dock single-app -bool TRUE && killall Dock
To disable single app mode, replace TRUE with FALSE in this command:
defaults write com.apple.dock single-app -bool FALSE && killall Dock
11. Change Rows and Columns in Launchpad
You can customize Launchpad by rearranging the apps. But you can also change the number of rows and columns displayed in Launchpad. By default, it displays seven columns and five rows of apps.
To change the number of columns, enter the following command in a Terminal window. Replace X with the number of columns you want:
defaults write com.apple.dock springboard-columns -int X
To change the number of rows, use this command, again replacing the X with the number of rows:
defaults write com.apple.dock springboard-rows -int X
Then force a restart of Launchpad and restart the Dock with the following command:
defaults write com.apple.dock ResetLaunchPad -bool TRUE && killall Dock
To revert to the default number of columns and rows, enter the following commands:
defaults delete com.apple.dock springboard-rows
defaults delete com.apple.dock springboard-columns
To completely reset Launchpad, including the arrangement of the apps, enter the following command in the Terminal:
defaults write com.apple.dock ResetLaunchPad -bool TRUE; killall Dock
Learn More About the Defaults Command
Don’t worry if you’re not comfortable using the defaults command. You can use a third-party tool to change settings on your Mac.