There are many reasons why you might want to look at hidden files or folders on your Mac. You might not know it, but there are thousands of hidden files and folders on your computer that you shouldn’t disturb or modify. However, there may be occasions where you need to locate certain hidden files. Sometimes just out of curiosity or perhaps to locate some hidden folder for troubleshooting purposes. In this case, you should learn how to show hidden files and folders.
Some experienced or advanced users know that when you have a problem with an app, you might need to remove a preference file or find logs to help you fix the problem. Some hidden files also take up a lot of space on your hard disk. However, if you don’t know how to do show hidden files and folders, you won’t be able to deal with these issues.
First, let me tell you what files are hidden and why are they hidden on your Mac.
Where do hidden files come from?
Both macOS and linux are based on the UNIX operating system. You can call the macOS a special UNIX. MacOS has almost the same contents as UNIX but the macOS has a “desktop environment” which helped it become the world’s second most popular operating system. In Unix, there is always a “.” in front of hidden file names and they won’t be displayed until you manually change the system to view hidden files. All kinds of files could be hidden files, such as a .bash profile or a .git directory. System folders like /private, /bin, /etc, /usr are also hidden by default.
Why are they hidden on your Mac?
The real reason that Apple set some files and folders hidden by default is that there is a risk to the system if you delete or modify these folders and files. I believe that most people are not advanced users. Apple regards these files or folder as significant files so be careful if you don’t know what you are doing, otherwise your Mac will lose data or could even be damaged.
How to show hidden items?
There are three methods to show hidden files/folders:
Method 1: Using Finder
• Keyboard shortcut
I highly recommend this way to show hidden files and folder since it is not only the easiest way, but also the quickest way.
If you are using the macOS Sierra or a higher version, you can open your Finder, then hit “command + shift + .(dot)” on your keyboard to show hidden files/folders.
If you hit the keyboard combination again, they will change back to original hidden status.
However, if you are running an older version than macOS Sierra, please choose Method 2: Using Terminal to show your hidden files.
• Keep certain folders visible
After performing method 1, you can see the hidden files or folder on your Mac. But sometimes you want to keep them always visible to make it easy to access. For example, you might want to make the hidden folder “~/Library” always visible since it stores your personal application support files and other important files. Here is how to do it.
Drag the hidden Library folder icon from Finder to the sidebar. This is the fastest way and it will keep the folder accessible even if you relaunch your Finder.
You can also hold down “command + alt” and drag the Library folder to your desktop to make a shortcut icon on your desktop.
• Go to certain folder (including hidden folders)
In some situations, you may already know the exact folder that you wish to view. You can follow the steps below to reach certain folders directly on your Mac:
1. Open a Finder window.
2. Open “Go to Folder…” by pressing the following keys; “shift + command + G” on your keyboard.
3. In the Go to the folder: dialog box, type the name of the directory you want to view.
Method 2: Using Terminal
Do you think the first method is too simple? Let’s try the hands-on method. Terminal, which is regarded as one of the most powerful app on Mac, can do anything you want to do since it owns the highest permission. Terminal can be found in spotlight very easily.
Then type the following command in terminal:
defaults write com.apple.finder AppleShowAllFiles -bool true
This command helps you set your Finder to show all files on your Mac.
If you want to switch them back to hidden status, you need to repeat the operation but remember to change the last word to false.
killall Finder
This command helps you restart your Finder to make your change effective.
You can also start the Terminal application from Launchpad. Now I should mention that all terminal commands listed in this article can be cut and pasted right into Terminal so you don’t have to re-type them.
Method 3: Using AppleScript
Do you prefer another option? Don’t worry! You can make a simple app with AppleScript.
1. Open “AppleScript” or “Script Editor” from your Launchpad. (The name of it depends on the system version, you can just type “script” in Spotlight)
2. Copy and paste this code into the edit window:
display dialog “Hide/Show Hidden Files and Folder” buttons {“Show”, “Hide”}
set switch to button returned of result
if switch is “Hide” then
do shell script “defaults write com.apple.finder AppleShowAllFiles -bool false;
KillAll Finder”
else
do shell script “defaults write com.apple.finder AppleShowAllFiles -bool true;
KillAll Finder”
end if
3. Click the Play button to compile the code.
4. Choose a folder then save and set the file format to “Application.”
Now the new app, named “Show/Hide Hidden Files and Folders”, has been generated by you. Do you feel a sense of achievement now? You can show or hide your hidden files with just one-click. It’s really easy to control.
Conclusion
After all these instructions, no matter which method you choose, I believe you know how to show all the files on your Mac.
How to keep your Mac always safe?
At the beginning of this article, I mentioned that sometimes we need to show hidden files and folders for troubleshooting purposes. You might be curious about why we should do this. I will tell you the reason. Although macOS is not open like Windows, it may still have malicious code like chill-tab. It’s really annoying if your browser has popups or always jumps to advertisement websites when you open a new tab. Almost all viruses or malware are usually hidden in your Mac, that’s why we need to show hidden items.
To make your Mac safe, we recommend Antivirus One. This popular and effective tool was developed by Trend Micro, an industry leader in computer security. Thousands of users have provided positive comments in the App Store. Antivirus One detects viruses on your Mac for free. You can also use it to clean adware, clean privacy in your browser, and even protect your web experience. After Antivirus One finds a virus or malware on your Mac, you can use it to remove them easily no matter whether they are hidden or not.
Try Antivirus One for free to keep your Mac always safe: