How To Show Hidden Files On Mac OS X Computer

The show hidden files Mac OS X guide!

Did you know how to show hidden files on Mac OS X computer yet? It's not similar to what you do in Windows. There is a bit more complicated and require you to type a few commands in Terminal in Mac OS X to show those hidden files.

My story is that I just switched to Mac OS X a few months ago. At that moment, I was just learning how to use this new operating system, from how to install or uninstall apps, copy and paste files, as well as, take screenshots. One day, I was wondering how to view system files that are hidden like in Windows? With the help of Google and information from a few sources, show or hide hidden files never been easier, especially doing that using short alias commands instead of typing long commands, which aren't easy to remember.

In Mac OS X, by default, all files that starting with a dot (“.”) before the file name are always invisible, including .bash_profile, .svn directory, or even .htaccess file. If you want to access these files, you need to make it visible.

Press Command + Shift + 4
How To Use Print Screen On A Mac OS X Computer
A simple guide to using the Print Screen Mac feature. Take a screenshot on a Mac OS X computer is… [Read Article]
force quit Mac on the dock
How To Force Quit Mac Apps In Mac OS X
A guide that contains six useful methods to use built-in tools on Mac OS X to force quit Mac applications.… [Read Article]

Before reading this guide, you may think to make hidden files to viewable is hard. But don't worry! Today, I write this simple guide to show you the easiest way to show hidden files on Mac OS X computer. You only need to type a few long commands in Terminal application once. Next time, you just need to use showFiles and hideFiles commands to show or hide hidden files on Mac.

Use Terminal Commands To Show Hidden Files Mac OS X

To show hidden files on Mac, click on the Finder icon in the bottom Dock and then go to Applications > Utilities and then open Terminal application.

open Terminal in Mac

In the next step, type the command below, or just copy & paste it, and then press the Enter key.

defaults write AppleShowAllFiles YES

show hidden files Mac

Next, press and hold the "Option" key, and then right-click on the "Finder icon" in the bottom dock and select "Relaunch".

Relaunch Finder In Mac

This action will refresh the Finder and show all hidden files on Mac OS X. If you want to hide these files again, type the following command in Terminal:

defaults write AppleShowAllFiles NO

hide hidden files Mac

If you can remember these commands, it's very easy for you to show or hide hidden files. However, in case you can't remember these commands, you will have to search for it on Google whenever you need to show or hide these files.

how to show hidden files Mac

Show And Hide Hidden Files On Mac OS X With Terminal Aliases

What's a Terminal alias? It's a shortcut for one or more commands. By creating aliases for the show hidden files or hide hidden files commands, you only need to remember aliases, and then you can show or hide files quicker.

To create aliases, open Terminal and then type:

sudo nano ~/.bash_profile

sudo nano command Terminal Mac

It will ask you to provide the administrator's password. Just enter your password and press the Enter key on your keyboard.

At the end of the .bash_profile file, just paste these code:

alias showFiles='defaults write AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/'

And then:

alias hideFiles='defaults write AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/'

create Terminal aliases Mac OS X

In the next step, press Control + O (or Ctrl + O) and then press Enter to save the modification on the file.

Ctrl + O Nano Editor Mac OS X

Next, press Control + X (or Ctrl + X) to exit the editor to return to the Terminal window.

In the Terminal, type:

source ~/.bash_profile

to make two above aliases available.

Refresh .Bash_Profile

In the next time when you want to show hidden files or hide hidden files, just type:




in Terminal, respectively.

showFiles and hideFiles to Show or Hide Hidden Files Mac OS X

showFiles and hideFiles to Show or Hide Hidden Files Mac OS X

With these aliases, it will help you to speed up the show or hide hidden files process. You can also create aliases for long commands in Terminal to do any tasks quicker.

If you have any questions about this show hidden files Mac guide, feel free to ask me by leaving your comment below.


  1. Lara November 4, 2016
  2. Gene Miller April 26, 2017
    • Tony Tran April 26, 2017

Leave a Reply