|
This is the BSDA Study Guide Book written via a
wiki collaboration.
This is a work in progress. You may contribute to or discuss this specific page at http://bsdwiki.reedmedia.net/wiki/Determine_the_directory_structure_of_a_system.html.
Determine the directory structure of a system
Concept
Be able to quickly determine the directory
layout used by BSD systems.
Introduction
Of course, the cd , find(1) and ls(1) commands can be used to explore the directory layout of the BSD system.
The following are the main directories found on a standard BSD system:
- / the main directory, the root of the filesystem
- /bin/ essential user commands
- /dev/ special device files TODO: is mknod and device files covered in this book? If so point to it
- /etc/ various configurations, user databases, and startup scripts
- /home/ the "home" (default login) directories owned by users
- /sbin/ essential system and administration tools
- /tmp/ scratch space for temporary files
- /usr/ most of the applications, documentation, and application data files
- /var/ log files, mail and printer spools, system databases, and other frequently changing data
TODO: cross-reference to section that covers it better
TODO: /lib/, /libexec/
TODO: list some of the main directories and explain (see hier(7))
For more details, read the hier(7) manual page which provides an outline of filesystem hierarchy.
The man page lists common directories and with basic explanations.
(TODO: FOOTNOTE: The NetBSD hier(7) manual also lists common files.)
The locate , find , and which commands and the PATH environment variable
can also be useful for becoming familiar with a system;
they are introduced in section Locate files and binaries on a system.
Examples
Practice Exercises
- List the directories under /etc/.
- Compare the directory layout under /usr/ with the /. TODO: reword this
- Do a directory listing in each of the main directories listed earlier. TODO: listed above?
More information
hier(7)
|