Difference between revisions of "Directory Structure"

From GhostBSD Wiki
Jump to: navigation, search
(Directory Structure)
(Directory Structure)
Line 31: Line 31:
 
|-
 
|-
 
|/boot/defaults/
 
|/boot/defaults/
|Default boot configuration files. Refer to loader.conf(5) for details.
+
|Default boot configuration files. Refer to [https://www.freebsd.org/cgi/man.cgi?query=loader.conf&sektion=5&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports loader.conf(5)] for details.
 
|-
 
|-
 
|/cdrom/
 
|/cdrom/
|default mount point for CD-ROM drives
+
|default mount point for CD-ROM drives
 
|-
 
|-
 
|/compat/
 
|/compat/
|normally a link to /usr/compat. If not, then the /usr/compat
+
|normally a link to <code>/usr/compat</code>. If not, then the <code>/usr/compat</code> comments apply
comments apply
+
 
|-
 
|-
 
|[[/dev/]]
 
|[[/dev/]]
|Device nodes. Refer to intro(4) for details.
+
|Device nodes. Refer to <code>intro(4)</code> for details. Device special files managed by [https://www.freebsd.org/cgi/man.cgi?query=devfs&sektion=5&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports devfs(5)]
 
|-
 
|-
 
|[[/etc/]]
 
|[[/etc/]]
Line 47: Line 46:
 
|-
 
|-
 
|/etc/defaults/
 
|/etc/defaults/
|Default system configuration files. Refer to rc(8) for details.
+
|Default system configuration files. Refer to [https://www.freebsd.org/cgi/man.cgi?query=rc&sektion=8&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports rc(8)] for details.
 
|-
 
|-
 
|/etc/mail/
 
|/etc/mail/
|Configuration files for mail transport agents such as sendmail(8).
+
|Configuration files for mail transport agents such as <code>sendmail(8)</code>.
 
|-
 
|-
 
|/etc/periodic/
 
|/etc/periodic/
|Scripts that run daily, weekly, and monthly, via cron(8). Refer to periodic(8) for details.
+
|Scripts that run daily, weekly, and monthly, via [https://www.freebsd.org/cgi/man.cgi?query=cron&sektion=8&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports cron(8)]. Refer to [https://www.freebsd.org/cgi/man.cgi?query=periodic&sektion=8&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports periodic(8)] for details.
 
|-
 
|-
 
|/etc/ppp/
 
|/etc/ppp/
|ppp(8) configuration files.
+
|[https://www.freebsd.org/cgi/man.cgi?query=ppp&sektion=8&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports ppp(8)] configuration files.
 
|-
 
|-
 
|/lib/
 
|/lib/
|critical system libraries needed for binaries in /bin and /sbin
+
|critical system libraries needed for binaries in <code>/bin</code> and <code>/sbin</code>
 
|-
 
|-
 
|/libexec/
 
|/libexec/
|critical system utilities needed for binaries in /bin and /sbin
+
|critical system utilities needed for binaries in /bin and <code>/sbin</code>
 
|-
 
|-
 
|/media/
 
|/media/
Line 71: Line 70:
 
|-
 
|-
 
|/net/
 
|/net/
|automounted NFS shares; see auto_master(5)
+
|automounted NFS shares; see [https://www.freebsd.org/cgi/man.cgi?query=auto_master&sektion=5&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports auto_master(5)]
  
 
|-
 
|-
 
|/proc/
 
|/proc/
|Process file system. Refer to procfs(5), mount_procfs(8) for details.
+
|Process file system. Refer to [https://www.freebsd.org/cgi/man.cgi?query=procfs&sektion=5&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports procfs(5)], <code>mount_procfs(8)</code> for details.
 
|-
 
|-
 
|/rescue/
 
|/rescue/
Line 87: Line 86:
 
|-
 
|-
 
|/tmp/
 
|/tmp/
|Temporary files which are usually not preserved across a system reboot. A memory-based file system is often mounted at /tmp. This can be automated using the tmpmfs-related variables of rc.conf(5) or with an entry in /etc/fstab; refer to mdmfs(8) for details.
+
|Temporary files which are usually not preserved across a system reboot. A memory-based file system is often mounted at <code>/tmp</code>. This can be automated using the tmpmfs-related variables of <code>rc.conf(5)</code> or with an entry in <code>/etc/fstab</code>; refer to <code>mdmfs(8)</code> for details.
 
|-
 
|-
 
|[[/usr/]]
 
|[[/usr/]]
Line 108: Line 107:
 
|-
 
|-
 
|/usr/local/
 
|/usr/local/
|Local executables and libraries. Also used as the default destination for the FreeBSD ports framework. Within /usr/local, the general layout sketched out by hier(7) for /usr should be used. Exceptions are the man directory, which is directly under /usr/local rather than under /usr/local/share, and the ports documentation is in share/doc/port.
+
|Local executables and libraries. Also used as the default destination for the FreeBSD ports framework. Within <code>/usr/local</code>, the general layout sketched out by [https://www.freebsd.org/cgi/man.cgi?query=hier&sektion=7&manpath=freebsd-release-ports hier(7)] for <code>/usr</code> should be used. Exceptions are the man directory, which is directly under <code>/usr/local</code> rather than under <code>/usr/local/share</code>, and the ports documentation is in share/doc/port.
 
|-
 
|-
 
|/usr/obj/
 
|/usr/obj/
|Architecture-specific target tree produced by building the /usr/src tree.
+
|Architecture-specific target tree produced by building the <code>/usr/src</code> tree.
 
|-
 
|-
 
|/usr/ports/
 
|/usr/ports/
Line 126: Line 125:
 
|-
 
|-
 
|[[/var/]]
 
|[[/var/]]
|Multi-purpose log, temporary, transient, and spool files. A memory-based file system is sometimes mounted at /var. This can be automated using the varmfs-related variables in rc.conf(5) or with an entry in /etc/fstab; refer to mdmfs(8) for details.
+
|Multi-purpose log, temporary, transient, and spool files. A memory-based file system is sometimes mounted at <code>/var</code>. This can be automated using the varmfs-related variables in <code>rc.conf(5)</code> or with an entry in <code>/etc/fstab</code>; refer to <code>mdmfs(8)</code> for details.
 
|-
 
|-
 
|/var/log/
 
|/var/log/
Line 138: Line 137:
 
|-
 
|-
 
|/var/tmp/
 
|/var/tmp/
|Temporary files which are usually preserved across a system reboot, unless /var is a memory-based file system.
+
|Temporary files which are usually preserved across a system reboot, unless <code>/var</code> is a memory-based file system.
 
|-
 
|-
 
|/var/yp/
 
|/var/yp/

Revision as of 16:19, 27 January 2020

Welcome to Icon Disti GhostBSD.png Directory Structure.
System
Directory Structure Standard Mount Points Configuration Files
Basics Users and Basic Account Management Permissions
Pc-sysinstall System Administration System Administration Utilities
Kernel Competence Hardware detection with dmesg GhostBSD Boot Process
Back to the Icon Disti GhostBSD.pngWiki

Introduction

The Ghost/FreeBSD directory hierarchy is fundamental to obtaining an overall understanding of the system. The most important directory is root or, “/”. 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 other file systems that are mounted during the transition to multi-user operation. Source: FreeBSD Handbook Chapter: 3.5. Directory Structure

A mount point is a directory where additional file systems can be connected to a parent file system. This is further described in FreeBSD Handbook Section 3.6, “Disk Organization”.

See also Standard Mount Points.


Directory Structure

At the first step we have to copy the Directory Structure from FreeBSD Handbook chapter: 3.5. Directory Structure in the following table. We use also hier(7). From here we will get deeper.

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 boot configuration files. Refer to loader.conf(5) for details.
/cdrom/ default mount point for CD-ROM drives
/compat/ normally a link to /usr/compat. If not, then the /usr/compat comments apply
/dev/ Device nodes. Refer to intro(4) for details. Device special files managed by devfs(5)
/etc/ System configuration files and scripts.
/etc/defaults/ Default system configuration files. Refer to rc(8) for details.
/etc/mail/ Configuration files for mail transport agents such as sendmail(8).
/etc/periodic/ Scripts that run daily, weekly, and monthly, via cron(8). Refer to periodic(8) for details.
/etc/ppp/ ppp(8) configuration files.
/lib/ critical system libraries needed for binaries in /bin and /sbin
/libexec/ critical system utilities needed for binaries in /bin and /sbin
/media/ contains subdirectories to be used as mount points for removable media such as CDs, USB drives, and floppy disks
/mnt/ Empty directory commonly used by system administrators as a temporary mount point.
/net/ automounted NFS shares; see auto_master(5)
/proc/ Process file system. Refer to procfs(5), mount_procfs(8) for details.
/rescue/ Statically linked programs for emergency recovery as described in rescue(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 which are usually not preserved across a system reboot. A memory-based file system is often mounted at /tmp. This can be automated using the tmpmfs-related variables of rc.conf(5) or with an entry in /etc/fstab; refer to mdmfs(8) for details.
/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 and system utilities executed by other programs.
/usr/local/ Local executables and libraries. Also used as the default destination for the FreeBSD ports framework. Within /usr/local, the general layout sketched out by hier(7) for /usr should be used. Exceptions are the man directory, which is directly under /usr/local rather than under /usr/local/share, and the ports documentation is in share/doc/port.
/usr/obj/ Architecture-specific target tree produced by building the /usr/src tree.
/usr/ports/ The FreeBSD Ports Collection (optional).
/usr/sbin/ System daemons and 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 using the varmfs-related variables in rc.conf(5) or with an entry in /etc/fstab; refer to mdmfs(8) for details.
/var/log/ Miscellaneous system log files.
/var/mail/ User mailbox files.
/var/spool/ Miscellaneous printer and mail system spooling directories.
/var/tmp/ Temporary files which are usually preserved across a system reboot, unless /var is a memory-based file system.
/var/yp/ NIS maps.