Easy way to Show & Hide Invisible Files

Warning: This may be an instance where I think I know more than I do. If that proves true let me know.

Sometimes You Need To See Invisible Files

Your computer has a bunch of files on it that are invisible so that most users don’t touch them. This is usually a good thing but from time to time you may have a need to edit such a file.

This tutorial assumes the following:

  • You are on a Mac.
  • You have Sublime Text installed. If you don’t, you can download and install it without buying it. It is only needed for setup. (Other text editors can be used, YMMV.)
  • You are cool with doing a few simple things in the command line, aka. Terminal.

How To Do It

  1. Launch Terminal (Applications > Utilities)
  2. Type cd ~ to take you to your User folder.
  3. Type ls -A to list all the files and folders. You’re looking for a file named .bash_profile.
  4. Type subl .bash_profile. This will either open the file in Sublime Text (if it exists) or create the file in Sublime Text (if it doesn’t).
  5. In the file add alias show="defaults write com.apple.finder AppleShowAllFiles -boolean true && Killall Finder" to create a command to show invisible files. You can rename “show” to something else if you like.
  6. In the file add alias hide="defaults write com.apple.finder AppleShowAllFiles -boolean false && Killall Finder" to create a command to hide invisible files. You can rename “hide” to something else if you like.
  7. Save and close the file “.bash_profile”.
  8. Quit Terminal.
  9. Relaunch Terminal.
  10. Type show in the Terminal and the Finder will show invisibles. Use hide to reverse it. (You can do this from any folder. You just have to be in the Terminal.)

For the Terminal-adverse

I understand that some folks just don’t like the Terminal and that’s okay. For those folks I’ve been told that InVisible is a good app to use.

Scroll to Top