The OS X user-level Library folder (
/Users/<your short name>/Library, or
~/Library for short) is hidden by default in OS X, from Lion onwards. I’m going to show you several different ways to show and open your Library in Lion, in increasing order of geekiness and permanence.
Mavericks update: Yet another, easier, way to reveal your library has appeared in Mavericks. Thanks to The Sweet Setup for the tip: head for your home folder in the Finder (you can use the Go->Home menu option, or Shift-Command-H), then View->Show View Options (Command-J). On the info pane you’ll find a “Show Library Folder” tick box. I guess that Apple worked out that people did sometimes need to get to their Library folder1.
Caution: anything you do in your Library, you do at your own risk. Apple have hidden it for a reason in Lion, and I’m not going to be responsible for anything you break if you open it up and start fiddling with it.
The Simplest Option
If you’re in the Finder, hold down Option (Alt) and hit the “Go” menu in the menubar. As long as you’re holding down the Option key, the Library will appear in the list of locations in the drop-down. Select it and a Finder window will open up on your Library folder.
Once you’ve got a Finder window opened on the Library, you might want to keep it hanging around by dragging it to your Finder’s Favourites list in the sidebar. But if you can’t see the folder itself, only open a window on its contents, how do you do that?
Well, the little folder icon in the title bar of every Finder window is actually draggable, if you hold down Option (Alt). So, holding Option, just click and drag the Library folder from the title bar of the Finder window straight to the sidebar, and put it wherever you want in your Favourites list.
Again, holding Option, you can also drag the titlebar folder icon straight onto the Finder toolbar. It’ll then appear in every new Finder window.
From a File Dialog
If you’re in a File Open/Save dialog, you can just type your way to your Library folder. This trick isn’t new to Lion. Just type a tilde (“~”) and you’ll be presented with a “Go to the folder” box. Carry on and type “~/Library”, hit enter, and you’re there.
- Just as “~” will bring up a “Go to the folder” box starting from your home folder, typing a “/” will bring it up starting from the root, so to get to the System Library folder, just type “/Library” and hit enter.
- If you’re in a File Open/Save dialog box and quickly want to get to any folder or file you can see in an open Finder window, just drag the folder or file straight from the Finder onto the dialog. The dialog will jump straight to it.
From the Terminal
The Library isn’t hidden from the Terminal; you can see it and access it just like normal. It’s worth remembering, though, the OS X
open command, which will open applications, files and — get this — Finder windows on folders. So, if you’re in the Terminal and want a Finder window on your Library, all you need to type is:
…hit return, and a Finder window will appear.
Reverting To A Non-Hidden Library
While still in the Terminal, try having a look at your Library, including the flags set on the directory, like this:
Matt-Gibsons-MacBook-Air:~ matt$ ls -lOd ~/Library/ drwx------@ 74 matt staff hidden 2516 18 Jul 15:26 /Users/matt/Library/
And there’s the secret: The Library has the “hidden” flag set.
To un-hide the Library, change the hidden flag with this command:
chflags nohidden ~/Library
You may need to restart (at least the Finder) for this flag change to take effect. Also, I can’t guarantee that you won’t need to re-do that every time there’s an OS X version update…
That’s all the ways I can think of to access the Library in Lion, for now!
If you’re in the market for more Lion tips, I’d recommend David Pogue’s book Mac OS X Lion: The Missing Manual:
- This post has had 38,000 views since I wrote it, so I’d tend to agree… [↩]