O'Reilly logo

Linux Pocket Guide, 2nd Edition by Daniel J. Barrett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

System Directories

A typical Linux system has tens of thousands of system directories. These directories contain operating system files, applications, documentation, and just about everything except personal user files (which typically live in /home).

Unless you’re a system administrator, you’ll rarely visit most system directories—but with a little knowledge you can understand or guess their purposes. Their names often contain three parts, which we’ll call the scope, category, and application. (These are not standard terms, but they’ll help you understand things.) For example, the directory /usr/local/share/emacs, which contains local data for the emacs text editor, has scope /usr/local (locally installed system files), category share (program-specific data and documentation), and application emacs (a text editor), shown in Figure 1-4. We’ll explain these three parts, slightly out of order.

Directory scope, category, and application

Figure 1-4. Directory scope, category, and application

Directory path part 1: category

A category tells you the types of files found in a directory. For example, if the category is bin, you can be reasonably assured that the directory contains programs. Common categories are:

Categories for programs

bin

Programs (usually binary files)

sbin

Programs (usually binary files) intended to be run by the superuser

lib

Libraries of code used by programs

libexec

Programs invoked by other ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required