We’ll explain how you can view hidden files on your Mac, but first, let’s cover a few important details.
Why Should Your Mac Hide Files From You?
Some files on macOS need to stay safely where they are—unaltered. You could even go so far as to brick your Mac if you accidentally delete or change one of these files. These include directories, libraries, and files that keep macOS running smoothly. Mess something up, and you could find yourself forced to restore or complete a fresh macOS install. If you don’t know what you’re doing, it’s all too easy to render your Mac unbootable or otherwise unusable if you play around with these files. Apple hides these files and folders so you don’t need to worry about ruining your Mac and having to restore everything. This does have the unfortunate side effect of making things a bit of a challenge when you do need to access these files. Perhaps you need to relocate a program directory, troubleshoot a misbehaving driver, or do something similar. If you know what you’re doing, that’s a good reason to unhide these files, at least temporarily. There are a few ways you can show hidden files on Mac.
How to View Hidden Files on a Mac
If you prefer to work via point and click, you can show hidden files on macOS using the Finder app. Here’s how to do it. This same key combination will work no matter what folder you have opened in Finder.
How to Access macOS Library Folder
Now, let’s say you just need to access your Mac’s Library folder, ~/Library. You don’t need to navigate through all of your computer’s folders to get there.
How to Show Hidden Files on Mac Using Terminal
If you prefer working in Terminal, you can enable showing hidden files there. Just type the following commands: Once those commands have run, a couple of things will happen. The Finder app will quit and relaunch itself. You’ll probably see your desktop icons disappear and then reappear. After that, you’ll be able to see all of your hidden files in Finder, along with any temporary files saved on your desktop. When you want to hide them again, you repeat the commands, replacing the value true with false. Again, Finder will quit and relaunch. Those hidden files will once again be hidden from view.
How to Hide Files On Mac Using Terminal
You might think this is less helpful than just doing everything in Finder. However, Terminal can be great if you have files and folders on your Mac that aren’t hidden, but you want them to be. To pull this off, here’s what you need to do. That will hide your file or folder from view. You can use the Terminal commands above to show it again, just to be sure.
Quickly and Temporarily Show Hidden Files in Terminal
If you don’t need or want to change how Finder displays your hidden files, you can list them in the Terminal. You do this using the command ls, list, appropriately enough.
From Terminal, type ls -aYou’ll see all of the files in your present directory, including hidden files and folders.
It’s the -a flag that makes the difference here. It tells the list command to display all files. If you want to execute this on a different folder, that’s easy.
From Terminal, type ls -a ~/.configJust replace ~/.config with the folder you want to view.
If you need this file or folder opened in the GUI, you can accomplish that using the open command. Here’s an example:
open .not_visible will launch the file called .not_visible, assuming there’s an app associated with it.
This same method works to open hidden folders in Finder, too.
open ~/.config will open the hidden folder .config in a Finder window.
Manipulate Hidden Files With Caution
Remember, those hidden files and folders are kept out of view for a good reason. If you accidentally delete or move a folder or file macOS depends on, you can cause some major problems. You could find yourself having to restore the operating system, then the rest of your files and apps from Time Machine. That’s not to say don’t try to work with hidden files and folders, mind you. Just use your best judgment, be cautious, and double-check what you’re doing before you commit to it. Want to learn some more cool tricks to do in Terminal? These macOS Terminal tricks should be a good place to start. Comment Name * Email *
Δ Save my name and email and send me emails as new comments are made to this post.