handbook-dirstructure
Directory Structure
The DragonFly directory hierarchy is fundamental to obtaining an overall understanding of the system. The most important concept to grasp is that of the root directory, /. This directory is the first one mounted at boot time and it contains the base system necessary to prepare the operating system for multi-user operation. The root directory also contains mount points for every other file system that you may want to mount.
A mount point is a directory where additional file systems can be grafted onto the root file system. This is further described in this Section. Standard mount points include /usr, /var, /tmp, /mnt, and /cdrom. These directories are usually referenced to entries in the file /etc/fstab. /etc/fstab is a table of various file systems and mount points for reference by the system. Most of the file systems in /etc/fstab are mounted automatically at boot time from the script rc(8) unless they contain the noauto option. Details can be found in this section.
A complete description of the file system hierarchy is available in hier(7). For now, a brief overview of the most common directories will suffice.
| Directory | Description | |
|---|---|---|
/ |
Root directory of the file system. | |
/bin/ |
User utilities fundamental to both single-user and multi-user environments. | |
/boot/ |
Programs and configuration files used during operating system bootstrap. | |
/boot/defaults/ |
Default bootstrapping configuration files; see loader.conf(5). | |
/dev/ |
Device nodes; see intro(4). | |
/etc/ |
System configuration files and scripts. | |
/etc/defaults/ |
Default system configuration files; see rc(8). | |
/etc/mail/ |
Configuration files for mail transport agents such as sendmail(8). | |
/etc/namedb/ |
named configuration files; see named(8). |
|
/etc/periodic/ |
Scripts that are run daily, weekly, and monthly, via cron(8); see periodic(8). | |
/etc/ppp/ |
ppp configuration files; see ppp(8). |
|
/mnt/ |
Empty directory commonly used by system administrators as a temporary mount point. | |
/proc/ |
Process file system; see procfs(5), mount_procfs(8). | |
/root/ |
Home directory for the root account. |
|
/sbin/ |
System programs and administration utilities fundamental to both single-user and multi-user environments. | |
/tmp/ |
Temporary files. The contents of /tmp are usually NOT preserved across a system reboot. A memory-based file system is often mounted at /tmp. This can be automated with an entry in /etc/fstab; see mfs(8). |
|
/usr/ |
The majority of user utilities and applications. | |
/usr/bin/ |
Common utilities, programming tools, and applications. | |
/usr/include/ |
Standard C include files. | |
/usr/lib/ |
Archive libraries. | |
/usr/libdata/ |
Miscellaneous utility data files. | |
/usr/libexec/ |
System daemons & system utilities (executed by other programs). | |
/usr/local/ |
Local executables, libraries, etc. Within /usr/local, the general layout sketched out by hier(7) for /usr should be used. An exceptions is the man directory, which is directly under /usr/local rather than under /usr/local/share. |
|
/usr/obj/ |
Architecture-specific target tree produced by building the /usr/src tree. |
|
/usr/pkg |
Used as the default destination for the files installed via the pkgsrcĀ® tree or pkgsrc packages (optional). The configuration directory is tunable, but the default location is /usr/pkg/etc. |
|
/usr/pkg/xorg/ |
X11R6 distribution executables, libraries, etc (optional). | |
/usr/pkgsrc |
The pkgsrc tree for installing packages (optional). | |
/usr/sbin/ |
System daemons & system utilities (executed by users). | |
/usr/share/ |
Architecture-independent files. | |
/usr/src/ |
BSD and/or local source files. | |
/var/ |
Multi-purpose log, temporary, transient, and spool files. A memory-based file system is sometimes mounted at /var. This can be automated with an entry in /etc/fstab; see mfs(8). |
|
/var/log/ |
Miscellaneous system log files. | |
/var/mail/ |
User mailbox files. | |
/var/spool/ |
Miscellaneous printer and mail system spooling directories. | |
/var/tmp/ |
Temporary files. The files are usually preserved across a system reboot, unless /var is a memory-based file system. |
|
/var/yp |
NIS maps. | |