Schemaninja logo

Schemaninja

How to Show Hidden Files On Mac?

Affiliate disclosure: In full transparency – some of the links on our website are affiliate links, if you use them to make a purchase we will earn a commission at no additional cost for you (none whatsoever!).

The modern world is hard to imagine without computers. One of the problems of this though is the fact that everyone now has a digital footprint and soft copies of various documents.

Now, these documents are often something entirely personal that if fallen into the wrong hands can cause a lot of trouble for you. So what does one do then to protect themselves from such an unfortunate turn of events? One of the safest and most preliminary measures to take is to hide important files.

While hiding files can be easy enough, sometimes we lose track of what we have hidden or need to access it for something.

What does one do then? Well, unhide the files of course! So, today we are going to show you guys how to show hidden files on Mac. Apart from hiding the files, you can lock the folder on the mac using a Password or passcode. Here is how to Protect folder in Mac.

How-to-Show-Hidden-Files-on-Mac

Now learning how to find hidden files on Mac can be a bit tricky. There are quite a few ways out there and a whole bunch of third-party software to help you achieve it as well. However, most of them are geared for Windows users. So today’s article is dedicated to teaching you guys on Apple’s side of the pond; how we can view hidden files, Mac.

Now we will not be using any third-party applications to show hidden folders on Mac primarily because of the security risk. Files that you want hidden obviously contain sensitive data and putting it in the hands of another software is a leap of faith many of you are unwilling to take.

But have no worries, we are here with the solution, it’s simple easy, and most importantly entirely organic to Mac OS X Yosemite. Just a little warning, since we are dealing with code here and the files are sensitive, be very careful of what you type in! With that said, let’s get this show on the road!

How to Show Hidden Files On Mac: The Easiest Method

Now I know I day say the easiest method but to make it actually easy there need to be two methods and not one! “Why?”, you ask! Well, that’s because if you have to see hidden files on mac on a regular basis, it gets tedious with the first method. Hence the second method, a batch script designed specifically for those who need to show hidden files on Mac on a daily basis for some reason or the other.

#1. How to Show Hidden Files On Mac using the Terminal

There are not a lot of complicated steps or instructions here to follow so I’ll run through the steps really fast.

Step 1

Navigate to Finder > Applications > Utilities > Terminal.

Step 2

With Terminal opened, type in the following code snippet:

defaults write com.apple.finder AppleShowAllFiles YES

Press return

Step 3

Now we got to relaunch Finder for the code above to do its magic! Hold the ‘Option/Alt’ key, and then click on the Finder icon in your dock and click on Relaunch.

How-to-Show-Hidden-Files-on-Mac

Step 4

Once relaunched, you will now be able to access all hidden files. To hide them again, follow the same steps but type this instead into the Terminal:

defaults write com.apple.finder AppleShowAllFiles NO

And you’re done! However sometimes even doing this every time we need to show hidden files on Mac can become tedious. Hence our solution!

#2. How to Show Hidden Files On Mac using Terminal Aliases

Now we are going to wrap up all of the above steps into one easy-to-use Terminal Alias. What’s a Terminal Alias though? It’s actually a sort of wrapper that when invoked does a set of predetermined commands so that you get to save time and don’t have to commit long command lines to memory!

Step 1

Open the Terminal app like we did before. In Terminal, type the next line in

sudo nano ~/.bash_profile

If you are using a password, then you will be asked to enter it now. Once done, just hit enter and proceed to the next step

Step 2

The bash profile will be enabled and at the bottom of the open .bash_profile file, we are going to add the following lines:

alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'

Step 3

Below that, we are going to add this bit of code

alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'

Step 4

Once done, press Ctrl + O and hit return to save the file. Then hit Ctrl + X to exit the file to come back to the command line

Step 5

When you’re back in the terminal write the following:

source ~/.bash_profile to refresh your profile and make the aliases available

Conclusion 

Now, whenever you want to show or hide files just type in the command,showFiles then hideFiles your job is done!

That leads us to the conclusion of this article! If you have any questions or queries, leave them in the comments below! If you wanted to hide apps on the iPhone, you can easily hide apps on iPhone. Along with apps, also see how to hide photos on iPhone.

Aishwar

Aishwar Babber is a passionate blogger and a digital marketer. He loves to talk and blog about the latest tech and gadgets, which motivates him to run GizmoBase. He is currently practicing his digital marketing, SEO, and SMO expertise as a full-time marketer on various projects. He is an active investor in NewSmartWave and ImageStation.

Leave a Comment