In its attempt to hide the nitty-gritty details of Mac OS X from regular users, Apple set the user’s Library folder (~/Library) to hidden in Lion, which means it doesn’t show up in Finder anymore. This can be quite annoying when you, for example, want to delete the preferences file of an application that’s acting up.
It’s fairly easy to unhide the Library folder: Just enter chflags nohidden ~/Library in a Terminal session and the folder shows up in Finder again. The problem: every OS update re-hides the folder.
The easiest way around this is to have that command execute every time you login. Here’s how.
Update: This actually only works if you open a Terminal session after logging in either manually or via a Login Item in System Preferences. For an alternate solution, see below.
- Open Terminal
- Navigate to your user’s home folder:
cd↩ - Make a backup copy of your .profile file:
cp .profile .profile.backup↩ - open .profile in a plain-text editor like vim:
vim .profile↩ - Add the following line to the end of the file:
chflags nohidden ~/Library - Save the file
The commands in the .profile file are executed every time you login to your Maca Terminal session. So even if an OS update hides ~/Library, after the mandatory reboot the command in .profile will unhide it again.
Note: You need to edit the .profile file with a plain-text editor, such as TextMate, TextWrangler or vim. vim can be hard to use if you’ve never used it before, so if, for example, you have TextMate, just enter the following command instead of the no. 4 above:
open /Applications/TextMate.app/ --args .profile↩.
Alternate solution: As mentioned in the update above, the .profile file is only “executed” when you open a Terminal session, but not when you login to your Mac via the regular login screen. So here’s an even easier way to unhide the ~/Library folder each time you log on to your Mac:
- Download this file.
- Unzip the file and move the contained file Unhide Library Folder to your user’s home folder or any folder therein.
- Open System Preferences->Users and Groups->Login Items.
- Click the + sign below the list of login items, find the Unhide Library Folder file, and click Add.
This application is a simple Applescript that executes the command chflags unhidden ~/Library. I needed to make it an actual application instead of an AppleScript, because adding a .scpt file to the login items just opens the script in AppleScript Editor instead of executing the script.
Potentially Related
- Cleaning up your iTunes library folder
- TerminalColours SIMBL plugin under Lion
- Sleep your Mac automatically at a certain time
- Find out which process is preventing emptying the trash on your Mac
- Quickly toggle function keys on the Apple Keyboard




Pingback: Red Sweater Blog – Permanently Unhide Library