Operating systems typically manage some hidden files for configuration on their own. The standard user is not meant to edit or delete these hidden files. However, if you are a programmer or system operator, you eventually want to show hidden files on macOS and edit the configurations.
The hidden files’ names typically start with a period
. or a tilde ~. For example the
.htaccess file for your webserver configuration is hidden by the system. Also, some files with non-special character names are hidden, e.g. the user’s
ls command in the Terminal lists all hidden files. On the contrary, the Finder does not. There are two ways to show the files in Finder as well. One way is to use the Finder itself. The other way is to use the Terminal.
Use the Finder to show hidden files
First option is to show hidden files on your macOS system using Finder. Follow these simple steps:
- Open the Finder and open your personal folder.
- Press the keyboard shortcut command⌘ + shift⇧ + . (period).
- Your hidden files become visible.
To hide the files again, you can just repeat the keyboard shortcut.
Use the Terminal
Second option is to show hidden files on your macOS system using the Terminal. Open a new Terminal window, and copy and paste the following command that shows hidden files on macOS in the Finder:
defaults write com.apple.finder AppleShowAllFiles YES
To fire the command hit the Enter key. Afterwards, the Finder shows hidden files. To hide the files again, repeat the step and change the
YES at the end of the line to a