Macs, like other operating systems, offer a way to cover files and folders, but Mac OS X masks those options and doesn’t make it as easy as it is on Windows and Linux. So, in this post, I will guide you on how to hide and show hidden files on Mac using Terminal.
However, It’s supposed to be so simple and intuitive to do stuff on a Mac that when something isn’t, it’s shocking. There are several ways to “hide” files and show hidden files on a Mac, but just one of them works really well enough for us to suggest. It’s not even about hiding things, so that others can’t see them. You may want to actually cover something sometimes because you want to declutter your system. When you transfer your Windows documents to the cloud, for example, you will find that many programs often use your Documents folder to save. Within Documents games too often build their own files.
You Might Also Like: How to Block Websites on Mac Using Terminal
How to Hide and Show Hidden Files on Mac Using Terminal
You can easily hide and find or show hidden files on Mac using Terminal commands. Since these commands work pretty well and without any effort, you can master them without any hassle. And yeah, you don’t need to run the latest macOS version to use this hack, either.
Hide Files and Folders on Mac Using Terminal
Instead of hiding an individual file— though you can do that — you might want to create a hidden folder. We’re going to do this for this example, although this trick will also work to cover individual files.
Step 1. Open or launch the Terminal app. The Terminal app is in the Utilities folder in Applications. To open it, either open your Applications folder, then open Utilities and double-click on Terminal, or press Command – spacebar to launch Spotlight and type “Terminal,” then double-click the search result.
Step 2. Now, enter the below-given command. Make sure not to press the Return key as yet.
chflags hidden
Step 3. After entering chflags hidden give a space then Navigate to the file or folder you want to hide, and then drag it to the end of the command in the Terminal window.
Step 4. Now, press the Return key.
Show Hidden Files and Folders on Mac in the Finder
Do you want to unhide or show hidden files or folders on Mac? Well, it’s just as straightforward.
Step 1. Open or launch the Terminal app.
Step 2. Enter the following command.
defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder
Step 3. Hit the Return key. Now, you can view all of your hidden files in Finder.
Unhide Files or Folders on Mac
If you want to unhide the particular files that you had hidden earlier, you can do so quickly.
Step 1. Open the Terminal.
Step 2. Now, enter the below-given command. Make sure not to press the Return key as yet.
chflags nohidden
Step 3. Next, make sure you include a space at the end of the command. Drag the file to the end of the command, then press the Return key.
Also Read: How to Uninstall Programs on Mac Computer in Two Different Ways 2020
Conclusion
So, this post was all about how to hide and show hidden files on Mac using Terminal. It’s easy to keep all your private files away from your eyes. While they work efficiently, I wish Apple could provide an easy way to hide files on the macOS operating system. It would be easier if the option existed within the configuration setting or the context menu itself.