Directory path part 2: scope
The scope of a directory path describes, at a high level, the purpose of an entire directory hierarchy. Some common ones are:
/ | System files supplied with Linux (pronounced “root”) |
/usr | More system files supplied with Linux (pronounced “user”) |
/usr/games | Games (surprise!) |
/usr/kerberos | Files pertaining to the Kerberos authentication system |
/usr/local | System files developed “locally,” either for your organization or your individual computer |
/usr/X11R6 | Files pertaining to the X window system |
So for a category like lib (libraries), your Linux system might have directories /lib, /usr/lib, /usr/local/lib, /usr/games/lib, and /usr/X11R6/lib. You might have other scopes as suits the system administrator: /my-company/lib, /my-division/lib, and so on.
There isn’t a clear distinction between / and /usr in practice, but there is a sense that / is “lower-level” and closer to the operating system. So /bin contains fundamental programs like ls and cat, /usr/bin contains a wide variety of applications supplied with your Linux distribution, and /usr/local/bin contains programs your system administrator chose to install. These are not hard-and-fast rules but typical cases.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access