I am a new to mac osx. One thing confusing me is what does /Library
or /System/Library
folders store? As its name meaning, I thought is should be something like /lib
or /usr/lib
in Linux. However, it does not. Inside it, it looks more similar to application bundles. And all naming is very application-specific, like /Library/iChat
. If they are application-specific, then why they are called Library
? Usually when named as Library
, it is for codes or resources sharing purpose.
Library. This folder contains fonts and other items used by apps that are available to all users of your Mac. Don't use this folder to store files and folders you create. Instead, use the home folder, the Desktop folder, the Documents folder, or iCloud Drive.
To view your user library folder, click Users > Your Name. Click on the Library folder where you will find the largest folder. Keep clicking the largest folder and you'll notice the largest files in it. To delete a folder or a file, check the box next to it, and click the Remove button.
The structure of the system level /Library folder closely matches that of the ~/Library folder, so if there are things in there (fonts, color profiles, scripts etc.) installed "for all users", you should back those up too.
Why does macOS need two Library folders? The System library is used by all users for system-wide needs. It's accessible to all users. The user Library, on the other hand, is accessible only by that particular user.
The library folders store settings, resources, and support files. There up to 6 "levels" of them:
Sandboxed apps don't have access to most of the user's home folder. They're mostly restricted to their own sandbox "container" (which is itself inside the user library), and as a result they get their own "private" libraries:
Now, as for the files inside the various library folders: Most of them are organized by type (e.g. there's a Preferences folder, a Caches folder, an Application Support folder, etc) with files/subfolders per application (or system component, or whatever). Some resource types are available to many or all programs (e.g. Fonts, Keychains, Services), so there's just a bunch of files there. However, some programs (mostly Apple-authored ones) are, um, egotistical enough to think they need their own top-level folder inside the library, so they go ahead and create one and store things in it.
As for the name "Library", I wouldn't read too much into it. It's basically a place to store things that programs need to get at, but that the user doesn't (generally) need to be explicitly aware of. Basically, things that the user never needs to double-click or use an open/save dialog to access. When you run Mail.app, you don't need to tell it to use the settings in ~/Library/Preferences/com.apple.mail.plist, or the cached mailbox contents in ~/Library/Mail, or the state information in ~/Library/Saved Application State/com.apple.mail.savedState.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With