Difference between revisions of "Directory Structure"

From GhostBSD Wiki
Jump to: navigation, search
(Directory Structure)
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{Welcome}}
 +
{{Navbar System}}
 +
 
==Introduction==
 
==Introduction==
  
The Ghost/<q>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.</q>
+
The Ghost/<q>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.</q> Source: [https://www.freebsd.org/doc/handbook/dirstructure.html 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, [https://www.freebsd.org/doc/handbook/disk-organization.html “Disk Organization”].
 +
 
 +
See also [[Standard Mount Points]].
  
A mount point is a directory where additional file systems can be grafted onto a parent file system (usually the root file system). This is further described in FreeBSD Handbook Section 3.6, [https://www.freebsd.org/doc/handbook/disk-organization.html “Disk Organization”].
 
  
Standard mount points include
+
==Directory Structure==
<pre style="color: green">
+
: /usr/
+
: /var/
+
: /tmp/
+
: /mnt/ 
+
: /cdrom/
+
</pre>
+
These directories are usually referenced to entries in
+
+
<pre style="color: green">/etc/fstab</pre>
+
  
This file is a table of various file systems and mount points and is read by the system. Most of the file systems in
+
At the first step we have to copy the Directory Structure from [https://www.freebsd.org/doc/handbook/dirstructure.html FreeBSD Handbook chapter: 3.5. Directory Structure] in the following table.
 +
We use [https://www.freebsd.org/cgi/man.cgi?query=hier&sektion=7&manpath=freebsd-release-ports hier(7)] and compare this structure with the installed structure of GhostBSD on metal. From here we will get deeper.
  
<pre style="color: green">/etc/fstab</pre>  
+
{|class="wikitable" style="width:96.5%;background:#FFFFFF; border:2px solid #008000;text-align:left;padding: 10px"  
 +
|-
 +
! scope="col" style="width: 100px;"|'''Directory'''
 +
! scope="col" style="width: 350px;"|'''Description'''
 +
|-
 +
|/
 +
|Root directory of the file system.
 +
|-
 +
|[[/bin/]]
 +
|User utilities fundamental to both single-user and multi-user environments. Examples: cat; chflags; chmod; cp; csh; dd......
 +
|-
 +
|[[/boot/]]
 +
|Programs and configuration files used during operating system bootstrap.
 +
|-
 +
|/cdrom/
 +
|default mount point for CD-ROM drives
 +
|-
 +
|/compat/
 +
|normally a link to <code>/usr/compat</code>. If not, then the <code>/usr/compat</code> comments apply
 +
|-
 +
|/dev/
 +
|Device nodes. Refer to [https://www.freebsd.org/cgi/man.cgi?query=intro&sektion=4&manpath=freebsd-release-ports intro(4)] 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/]]
 +
|System configuration files and scripts.
 +
|-
 +
|/home/
 +
|is a link to <code>/usr/home</code>  
 +
|-
 +
|/include/
 +
|new on GhostBSD without content
 +
|-
 +
|/lib/
 +
|critical system libraries needed for binaries in <code>/bin</code> and <code>/sbin</code>
 +
|-
 +
|/libdate/
 +
|new on GhostBSD without content
 +
|-
 +
|/libexec/
 +
|critical system utilities needed for binaries in /bin and <code>/sbin</code>
 +
|-
 +
|/man/
 +
|new on GhostBSD without content
 +
|-
 +
|/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 [https://www.freebsd.org/cgi/man.cgi?query=auto_master&sektion=5&apropos=0&manpath=FreeBSD+12.1-RELEASE+and+Ports auto_master(5)]
  
are mounted automatically at boot time from the script
+
|-
 +
|/proc/
 +
|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)], [https://www.freebsd.org/cgi/man.cgi?query=mount_procfs&sektion=8&manpath=freebsd-release-ports mount_procfs(8)] for details.
 +
|-
 +
|/rescue/
 +
|Statically linked programs for emergency recovery as described in [https://www.freebsd.org/cgi/man.cgi?query=rescue&sektion=8&manpath=freebsd-release-ports rescue(8)].
 +
|-
 +
|/root/
 +
|Home directory for the root account.
 +
|-
 +
|[[/sbin/]]
 +
|System programs and administration utilities fundamental to both single-user and multi-user environments.
 +
|-
 +
|/share/
 +
|new on GhostBSD without content
 +
|-
 +
|/tests/
 +
|new on GhostBSD without content
 +
|-
 +
|/tmp/
 +
|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 [https://www.freebsd.org/cgi/man.cgi?query=rc.conf&sektion=5&manpath=freebsd-release-ports rc.conf(5)] or with an entry in <code>/etc/fstab</code>; refer to [https://www.freebsd.org/cgi/man.cgi?query=mdmfs&sektion=8&manpath=freebsd-release-ports mdmfs(8)] for details.
 +
|-
 +
|[[/usr/]]
 +
|The majority of user utilities and applications.
 +
|-
 +
|[[/var/]]
 +
|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 [https://www.freebsd.org/cgi/man.cgi?query=rc.conf&sektion=5&manpath=freebsd-release-ports rc.conf(5)] or with an entry in <code>/etc/fstab</code>; refer to [https://www.freebsd.org/cgi/man.cgi?query=mdmfs&sektion=8&manpath=freebsd-release-ports mdmfs(8)] for details.
 +
|-
 +
|/www/
 +
|new on GhostBSD without content
 +
|-
 +
|file: /COPYRIGHT
 +
|opyright (c) 1992-2019 The FreeBSD Project.
  
[https://www.freebsd.org/cgi/man.cgi?query=rc&sektion=8&manpath=freebsd-release-ports <pre style="color: green">rc(8)</pre>]
+
|}
  
unless their entry includes ''noauto''. Details can be found in FreeBSD Handbook Section 3.7.1 [https://www.freebsd.org/doc/handbook/mount-unmount.html#disks-fstab “The fstab File”].
+
[[Category:Central Station Sysutils]]

Revision as of 15:18, 24 March 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 hier(7) and compare this structure with the installed structure of GhostBSD on metal. 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. Examples: cat; chflags; chmod; cp; csh; dd......
/boot/ Programs and configuration files used during operating system bootstrap.
/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.
/home/ is a link to /usr/home
/include/ new on GhostBSD without content
/lib/ critical system libraries needed for binaries in /bin and /sbin
/libdate/ new on GhostBSD without content
/libexec/ critical system utilities needed for binaries in /bin and /sbin
/man/ new on GhostBSD without content
/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.
/share/ new on GhostBSD without content
/tests/ new on GhostBSD without content
/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.
/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.
/www/ new on GhostBSD without content
file: /COPYRIGHT opyright (c) 1992-2019 The FreeBSD Project.