18 ways to view the ~/Library folder in Lion and Mountain Lion
[Editor's note: The list is now up to 19, thanks to a great reader tip.]
Inside your Home folder is a Library folder (
~/Library), accessible only to you, that's used to store your personal application-support files and, in some cases, data. The files and folders in
~/Library are generally meant to be left alone, but if you’ve been using Mac OS X for a while, chances are you’ve delved inside. Perhaps you wanted to tweak something using a tip from Macworld, Mac OS X Hints, or elsewhere on the Web. Or maybe a developer asked you to delete a preference file, or grab a log file, while troubleshooting a program. Whatever the case may have been, you simply opened your Home folder to access the Library folder.
But if you’ve just upgraded to Lion, try accessing your personal Library folder that way now. Go ahead…I’ll wait.
What’s that? It’s gone? It seems so, doesn’t it? But rest assured, your personal Library folder is right where it’s always been, at the root level of your Home folder. But in Lion, Apple has made the folder invisible. The reason for this move is presumably that people unfamiliar with the inner workings of Mac OS X often open
~/Library and start rooting around, moving and deleting files, only to find later that programs don’t work right, application settings are gone, or—worse—data is missing. This is the same reason Apple has always hidden the folders containing OS X’s Unix underpinnings:
/usr, and the like.
~/Library but not
/Library, the similar folder located at the root level of your drive, which holds systemwide support files? Most likely because only admin users can modify
/Library, and Apple assumes that a user with admin-level privileges will know what he or she is doing. Yes, I realize that’s a questionable assumption, given that the first user account on a Mac is always set up as an admin account. But that's fodder for a different article.)
While I understand Apple’s motives here—I’ve had to troubleshoot more than a few Macs on which an inexperienced user had munged the contents of
~/Library—there are plenty of valid reasons a user might need to access their personal Library folder. Luckily, as I mentioned, the folder is just hidden, using a special file attribute called the hidden flag. You just need to know how to access the folder or, if you prefer, unhide it. I've come up with 18 ways to do so; which one(s) you choose will depend on how frequently you’ll need to access the folder and which method better fits your workflow.
Ways to view it occasionally
If you’re the kind of user who rarely visits
~/Library, but you'd like to be able to open it if the need arises, these methods are for you.
Use Go To Folder The Go To Folder command, in the Finder’s Go menu (also accessible by pressing Shift+Command+G), has long been a quick way to access invisible folders such as
/usr; it’s now useful for accessing your Library folder, as well. Just type
~/Library and click Go to view the folder in the current Finder window.
Option-click the Go menu In Lion, as in Snow Leopard, the user-level Library folder is not included in the Finder’s Go menu. But in Lion, if you Option-click the Go menu, your Library folder magically appears in the menu; choose Library from the menu to open the folder in the Finder.
open command in Terminal Launch Terminal (in
/Applications/Utilities) from within your own account, type
open ~/Library, and press Return to open the folder in the Finder.
Use an application that provides access Some applications that store files in
~/Library (usually in
~/Library/Application Support) include a button or menu command for opening that program’s support folder. Do so, and then navigate up the folder hierarchy (by right-clicking the Finder-window’s title-bar icon, by pressing Command+Up, or, in column view, by scrolling to the left) to view the contents of your Library folder. Perhaps the easiest option here is to activate Apple’s Scripts menu (via the preferences window for AppleScript Editor, which is in
/Applications/Utilities); this systemwide menu includes an Open User Scripts Folder command.
Use an AppleScript Speaking of AppleScript, you can create a simple script that opens your Library folder. Launch AppleScript Editor, create a new script document, and enter the command
do shell script "open ~/Library". Save the script in Script file format in your Scripts folder (
~/Library/Scripts—alas, in the Save dialog, you'll need to use the Go To Folder shortcut—Shift+Command+G—just to get to the Scripts folder). If you make the Scripts menu visible, as explained in the previous item, you can choose this script at any time to open your Library folder. Some third-party launcher utilities (see the next item) will even let you run scripts using the keyboard or keyboard shortcuts.
Use a launcher utility Most launcher utilities, such as Alfred, Butler, LaunchBar, and Launcher, let you quickly open folders in the Finder. For example, Launcher will let you assign a keyboard shortcut to
~/Library; press that shortcut at any time to open the folder.
Ways to view it frequently but keep it invisible
These procedures are for the people who access
~/Library often enough that they want quick access, but they still want to keep the folder invisible. In order to use one of these options, though, you must first access the
~/Library folder using one of the procedures in the previous section—you can’t keep the folder accessible until you’ve accessed it at least once.
Use the Recent Folders menu If you’ve accessed your Library folder recently, it will appear in the Recent Folders submenu in the Finder’s Go menu. Choose it from here to open it in the Finder.
Put it in the Dock Once you’ve opened the
~/Library folder in the Finder, drag its icon from the Finder window’s title bar into the Dock. (Alternatively, if you’re viewing your Library folder in the Finder’s column view, you can drag its icon from the Finder window to the Dock.)
Put it in the Finder-window toolbar Once you’ve opened the
~/Library folder in the Finder, make sure Finder-window toolbars are enabled (View: Show Toolbar). Then drag the Library folder’s icon from the Finder-window title bar and drop it onto the window’s toolbar. (Alternatively, if you’re viewing your Library folder in the Finder’s column view, you can drag its icon from the Finder window to the toolbar.) Note that you may need to hold the icon over the toolbar for a second or so before you see the green Add (+) icon indicating that you can add the folder.
Put it in the Finder-window sidebar Once you’ve opened the
~/Library folder in the Finder, make sure Finder-window sidebars are enabled (View: Show Sidebar). Then drag the Library folder’s icon from the Finder-window title bar and drop it in the Favorites section of the window’s sidebar. (Again, if you’re viewing your Library folder in the Finder’s column view, you can drag its icon from the Finder window to the sidebar.)
Make an alias Once you’ve opened the
~/Library folder in the Finder, hold down Command+Option and drag the Library-folder icon from the Finder window’s title bar to your Desktop. (If you’re in the Finder’s column view, you can Command+Option+drag it from inside the Finder window to your Desktop.) This creates an alias to your Library folder; you can place this alias anywhere you like and use it to open your personal Library folder.
Create a symbolic link A symbolic link is similar to an alias (although it’s treated slightly differently by some programs—for example, most Unix programs don’t understand Mac OS aliases). To create a symbolic link to
~/Library, launch Terminal, type
ln -s ~/Library ~/Desktop/Library, and then press Return. This creates a symbolic link on your Desktop to your Library folder. You can move this link anywhere on your hard drive; double-click the link just like any folder to open your Library folder. (If you’re Terminal-averse, there are third-party utilities, such as SymbolicLinker, that let you create symbolic links.)
Use a third-party file utility A number of third-party file browsers and Finder substitutes, including Path Finder, include the option to show invisible files in their file listings. You can use one of these utilities to open your Library folder whenever you need access to it.
Create a keyboard shortcut for opening it Mac OS X lets you assign a keyboard shortcut to any menu command. But what you may not know is that you can even create a keyboard shortcut for a hidden menu item—such as, say, the Go menu's Library item. Here's how to create a keyboard shortcut that opens your Library folder:
- Launch System Preferences (Apple Menu: System Preferences) and click the Keyboard pane.
- Select the Application Shortcuts item in the left column.
- Click the Add (+) button below the list of shortcuts on the right.
- In the dialog that appears, choose Finder.app from the Application pop-up menu.
- Type Library in the Menu Title field.
- Click in the Keyboard Shortcut field and type your preferred shortcut. (I use Shift-Command-L to match the other keyboard shortcuts in the Go menu.)
- Click Add.
You can now open your Library folder at any time by simply pressing your keyboard shortcut. (Thanks to Macworld reader talmy for reminding me of keyboard shortcuts!)
Ways to make it permanently visible
“Invisible? I know what I’m doing—show me the folder all the time!”
Change the folder's "hidden" flag using a third-party utility Many of the third-party file browsers and Finder substitutes that let you view invisible files also let you change the visibility of files. So, for example, you could browse to your invisible Library folder in Path Finder (mentioned above), use Path Finder’s own Get Info command, and then uncheck the Invisible attribute; your Library folder will then be visible in the Finder, as well. Another option is to use the free Invisiblix utility: Launch it, choose File: Browse Hidden Files, and choose your Library folder in the navigation dialog; in the resulting Invisiblix window, uncheck Hidden to make the folder visible.
Similarly, many third-party "tweaking" utilities, such as Mac Gem TinkerTool System, have in the past few weeks been updated to include a checkbox specifically for making your Library folder visible. (These utilities are simply changing the same setting described in the previous paragraph.)
Change the hidden flag using Terminal Launch Terminal from within your own account, type
chflags nohidden ~/Library, and press Return. Your Library folder is now permanently visible. To make the folder invisible again, use the command
chflags hidden ~/Library.
Change the hidden flag using AppleScript If you’re an old-school Mac user who prefers AppleScript to Terminal commands, open AppleScript Editor, type (all on one line)
tell application "System Events" to set visible of folder "~/Library/" to true, and click the Run button in the toolbar. To make the folder invisible again, use the same command, changing
Toggle visibility using AppleScript Even better, you can create an AppleScript that toggles the invisibility of the
~/Library folder. Copy the following code into a new AppleScript Editor window, then save the new script in Script format, preferably in your Scripts folder (
~/Library/Scripts). You can then toggle the visibility of your Library folder by running the script from OS X’s Scripts menu or a third-party utility such as FastScripts or LaunchBar.
tell application "System Events" set libvis to (get visible of folder "~/Library") end tell if libvis = false then --~/Library is currently invisible tell application "System Events" to set visible of folder "~/Library/" to true else --~/Library is visible tell application "System Events" to set visible of folder "~/Library/" to false end if
Show all hidden files Call this the nuclear option: The Finder has a hidden setting that forces the Finder to show all hidden files, no matter how they’ve been hidden. By enabling this option, the
~/Library folder will always be visible…along with the thousands of other files OS X usually keeps hidden. To do this:
- Launch Terminal in your user account, type
defaults write com.apple.Finder AppleShowAllFiles true, and press Return.
- Relaunch the Finder. You can do this in Terminal by typing
killall Finder. Alternatively, you can hold down the Option key and right-click (or Control-Option-click) on the Finder icon in the Dock; choose Relaunch from the Dock menu that appears.
If you want to reverse this procedure, perform the same two steps again, replacing
true in the Terminal command with
Be safe in there
Whew! Did I miss any? Let us know in the comments.
Whichever of these myriad methods you use to access your personal Library folder, remember to be careful. Deleting or moving the wrong file(s) inside this folder could cause an application to misbehave (or, in the case of things like System Preference panes, to disappear altogether), to lose its settings, or even to lose its data.
Senior editor Dan Frakes personally uses the
chflags command in Terminal (via LaunchBar) or uses FastScripts to run the toggle-visibility AppleScript.
Updated 7/25/2011, 10:30am, to add tip about creating a keyboard shortcut; and at 3:50pm to correct an error about the Go menu in Snow Leopard, and to add a note about third-party utilities adding a setting specifically for showing the Library folder.
Product mentioned in this article
OS X Lion (10.7)
Amazon Shop buttons are programmatically attached to all reviews, regardless of products' final review scores. Our parent company, IDG, receives advertisement revenue for shopping activity generated by the links. Because the buttons are attached programmatically, they should not be interpreted as editorial endorsements.
At $30 for all of your Macs, the only reason not to upgrade to Lion is because you rely on old PowerPC-based apps that won’t run on it. Otherwise, it’s a great price for a major upgrade.Get It for $30.00