How to Show or Hide Files on your MAC OS

How to Show or Hide Files on your MAC OS

Hiding files and Showing files on Microsoft Windows is most common these days, But when it comes comes to Hide or Show files on MAC then we remain quite on this topic. Apple MAC plays a different role than Microsoft Windows, by keeping this in mind we forget that both are Operating Systems only which helps in Computing.


Hidden files plays a crucial role in keeping secrets of your folders in your Windows Computer. Any type of file hidden on your MAC Computer doesn’t affects any programme on your Computer or Laptop instead it hides your content, which others cannot see. Using TERMINAL on your MAC Computers or Laptop can help you in Hiding or Showing Files.

Check out →
Enable Right Clicks on Social Sites, Bank Sites and other Website on Computers
How to Download UC Browser for Computers v4.0
How to Take screenshots on any Android Device
How to Backup Message and Call Logs on Gmail

By creating a new Alias (icons that point to some other file, program or disk drive and are also called as Shortcut on Windows) in your TERMINAL will help you out in showing or hiding files on your MAC systems with saving your time. Hiding your files can be usefull at sometimes, as others cannot see it. So lets get started on this trick as there are 2 Methods to do these Changes:

Note: This trick works better on MAC OS X Mavericks, Yosemite and later Versions.How to Show or Hide Files on your MAC OS

How to Show or Hide Files on your MAC OS:

1st Method:

  • GOTO: Terminal found in
Finder → Applications → Utilities
  • In Terminal, paste the following code:
defaults write com.apple.finder AppleShowAllFiles YES
  • Press return.
  • Hold ‘alt’ on your keyboard, then right click on the Finder icon in the dock and click Relaunch it.
  • Relaunch Finder by right clicking the Finder Icon whilst hosting the `alt` key.How to Show or Hide Files on your MAC OS 1
  • This will show all hidden files. To hide them again, follow the same steps but replace the Terminal command with:
defaults write com.apple.finder AppleShowAllFiles NO

Its not the longest set of instructions or the biggest command to commit to memory but if you’re doing this a lot, it’s worth spending a few minutes now to save yourself a lot more time in the future. So for it, you should learn to create Alias for saving your time in showing or hiding the files with 2nd method.


2nd Method: Show/Hide Hidden Files using Terminal Aliases →

  • Goto: Terminal found in
 Finder → Applications → Utilities
  • Now in Terminal, paste the code:
spcname ~/.bash_profile
  • Then Enter your Macs administration password if asked and hit on return.
  • Now at the bottom of the open .bash_profile file, paste the code:
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
  • Below that, paste the code:
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
  • Now Press ctrl + O and hit return to save the file.
  • Press ctrl + X to exit the file and return to the command line.
  • In Terminal, paste the following as:
source ~/.bash_profile
  • to refresh your profile and make the aliases available
  • Now when you want to show hidden files, all you need type in Terminal is showFiles and type ‘hideFiles’ when you want to hide them.

Points to be noted:

alias – tells Terminal that we’re adding a new alias.

showFiles – is the name of the your alias and Change this to what you wish.

We then give the alias two commands. The first being:

defaults write com.apple.finder AppleShowAllFiles YES;

This is the command to show hidden files and is ended with a semi-colon ; so we can then use the second command:

killall Finder /System/Library/CoreServices/Finder.app

This will relaunch your MAC Finder (to replicate its step of holding ‘alt’ on the keyboard then right clicking the Finder icon on your dock).


Aliases are used to speed up your interaction with the Terminal. Setting up an alias for navigating to your most used directories, to commit to a GitHub repo and so on.If you have any difficulty, then you can ask us anytime. We are here for you.


See me

Don’t forget to Give your valuable comments..

Be the first to comment