This guide shows you how to unlock hidden and advanced features on your Mac using the Terminal app. You’ll learn the exact commands to reveal the Library folder, enable text selection in Quick Look, show hidden files in Finder, and more. No prior command-line experience is needed—just follow the steps carefully.
What You’ll Need
- A Mac running macOS (any recent version, from Catalina to Sonoma).
- An administrator account (you’ll need to enter your password for some commands).
- Terminal app, located in Applications > Utilities.
- A backup of your important data (some changes affect system behavior).
Step-by-Step
- Open Terminal. Go to Finder > Applications > Utilities and double-click Terminal. Alternatively, press Cmd + Space, type “Terminal”, and hit Return.
- Show hidden files in Finder. Type the following command and press Return:
defaults write com.apple.finder AppleShowAllFiles -bool true
Then restart Finder by typing:killall Finder
Hidden files (those starting with a dot) will now appear in Finder windows. To revert, changetruetofalseand runkillall Finderagain. - Enable text selection in Quick Look. Quick Look normally doesn’t let you select text in previews. Run:
defaults write com.apple.finder QLEnableTextSelection -bool true
Then restart Finder withkillall Finder. Now you can select and copy text from Quick Look previews (e.g., in PDFs or text files). - Reveal the hidden Library folder in Finder. The user Library folder is hidden by default. To show it permanently, run:
chflags nohidden ~/Library
You can also access it quickly by holding Option and clicking Go in the Finder menu bar—but the command makes it always visible. - Increase the number of recent items shown. To show more items in the “Recent Items” menu (default is 10), run:
defaults write com.apple.recentitems MaxRecentItems -int 20
Replace20with any number you like. Restart the menu by logging out and back in or restarting the Mac. - Disable the “Are you sure you want to open this file?” warning. For downloaded apps, you can suppress the Gatekeeper warning for a specific app by right-clicking it and selecting Open, then confirming. To disable the warning for all apps (not recommended), run:
sudo spctl --master-disable
You’ll be prompted for your password. To re-enable, usesudo spctl --master-enable. - Enable the “Quit” option in Finder. By default, Finder doesn’t have a Quit menu item. To add it, run:
defaults write com.apple.finder QuitMenuItem -bool true
Thenkillall Finder. You can now quit Finder (it will relaunch when needed). To undo, setfalse. - Turn on the “Show Path Bar” in Finder. This shows the full path at the bottom of Finder windows. Run:
defaults write com.apple.finder ShowPathbar -bool true
Thenkillall Finder. The path bar appears—click a folder to jump to it. - Add a “New Folder with Selection” shortcut to the right-click menu. This is a handy feature that lets you create a folder containing the selected items. Run:
defaults write com.apple.finder FXEnableNewFolderWithSelection -bool true
Thenkillall Finder. Now right-click on selected files and choose New Folder with Selection. - Reset the Launchpad layout. If Launchpad icons are messed up, reset the database with:
defaults write com.apple.dock ResetLaunchPad -bool true
Thenkillall Dock. This restores the default icon layout.
Common Mistakes
- Typing commands with extra spaces or wrong capitalization. Commands are case-sensitive;
killall finderwon’t work—useFinder. - Forgetting to restart the app. Many changes only take effect after running
killall Finderorkillall Dock. - Using
sudowhen not needed. Commands likedefaults writedon’t requiresudo; using it can cause permission issues. - Not backing up before changing system settings. Some tweaks can affect system stability—always have a backup.
- Mixing up
trueandfalse. Double-check the command before running; a typo can hide files instead of showing them.
Tips
- Test one change at a time. This way, if something goes wrong, you know exactly which command caused it.
- Create a backup of your defaults. Before changing a setting, you can export the current domain with:
defaults export com.apple.finder ~/Desktop/finder-backup.plist
To restore, usedefaults import. - Use
defaults readto check current settings. For example,defaults read com.apple.finder AppleShowAllFilesshows the current value. - Keep a list of commands you’ve run. Store them in a text file so you can revert easily.
- Restart your Mac after major changes. Some tweaks (like those affecting the Dock) may need a full restart to behave correctly.
Troubleshooting
- Command not found. If you see “command not found”, you likely have a typo. Check the spelling and spaces. Copy-paste commands from a trusted source.
- Changes don’t take effect. Make sure you ran
killall Finder(orkillall Dockfor Dock-related changes). If that doesn’t work, log out and back in, or restart your Mac. - Finder keeps crashing after a change. Boot into Safe Mode (hold Shift during startup) and revert the last command you ran. Then restart normally.
- Permission denied. If you get “Operation not permitted”, you may need to grant Terminal Full Disk Access in System Settings > Privacy & Security > Full Disk Access. Enable it for Terminal, then retry.
- Can’t revert a change. If you forgot the original value, you can reset the entire domain to defaults with:
defaults delete com.apple.finder
Thenkillall Finder. This resets all Finder settings—be aware it will also reset your custom view options. - macOS updates revert changes. Some tweaks are reset by system updates. Reapply them after updating.
Frequently Asked Questions
Is it safe to use Terminal commands?
Most defaults write commands are safe and reversible. Commands that use sudo or modify system files carry more risk. Always back up and understand what a command does before running it.
Can I undo a command?
Yes. For defaults write, you can change true to false or false to true. For chflags, use chflags hidden to reverse. For sudo commands, there’s usually a corresponding enable/disable command.
Why do I need to restart Finder?
Finder caches its settings in memory. killall Finder forces it to quit and relaunch, reading the new settings. Without it, changes won’t appear.
Do these commands work on all Macs?
Yes, they work on Intel and Apple Silicon Macs running macOS Catalina or later. Some commands may be deprecated in future versions, but as of now they work.
Can I use Terminal to enable hidden features in other apps?
Yes, many apps have hidden preferences accessible via defaults write. For example, Safari has several. Search for “defaults write [bundle ID]” to find them.
Will these commands void my warranty?
No, they don’t void the hardware warranty. However, if a command causes system instability, Apple Support may ask you to revert it before troubleshooting.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- USB-C vs Thunderbolt: Key Differences
- How to Turn Off Background App Refresh on Apple Watch
- Nvidia App GPU Tuning: Safe Manual Overclock
- 10 Tips for Fast Healthy Computer Performance
- Gmail Archive: What It Is and How to Use It
- Fix Microsoft Weather App Issues Windows 10