> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/ask/flat/chapter-17-system-administration/di-17.1-jie-xi-tong-mu-lu-jie-gou.md).

# 17.1 System Directory Structure

FreeBSD follows the hier(7) specification to organize the filesystem hierarchy. At system startup, the root directory **/** is mounted first, containing the basic system required to enter multi-user mode. This section explains the function and design principles of each subdirectory under the root directory level by level.

## Directory Structure Overview

The root directory (**/**) is the top-level directory of the filesystem, mounted first at system startup, containing the basic system required for the operating system to enter multi-user mode. The root directory also contains mount points for other filesystems. A mount point is a directory where additional filesystems can be attached to a parent filesystem (typically the root filesystem). Standard mount points include **/usr/**, **/var/**, **/tmp/**, **/mnt/**, and **/media/**.

## Design Principles of FreeBSD Directory Structure

The directory structure design of FreeBSD follows these principles:

* **Single Root Directory Principle**: Unlike systems such as Windows that adopt a multi-root (multi-drive-letter) design, UNIX systems use a single root directory (**/**) as the starting point of the entire filesystem. All storage devices, partitions, and network filesystems are incorporated into the unified directory tree by means of mounting.
* **Functional Separation Principle**: Files with different functions are allocated to different directories, and each filesystem can be independently managed, mounted, and backed up. For example, system binaries (**/bin**, **/sbin**) are separated from user applications (**/usr/local**), and configuration files (**/etc**) are separated from log data (**/var/log**). **/var** contains log directories, spool directories, and temporary files, which may fill up, so it should be separated from **/**.
* **Base System and Third-Party Software Separation Principle**: FreeBSD strictly separates the base system from third-party software. Base system components are installed in directories such as **/bin**, **/sbin**, **/usr/bin**, **/usr/sbin**, and **/usr/lib**, while third-party software installed via Ports or pkg is uniformly installed under **/usr/local/** in corresponding subdirectories (such as **/usr/local/bin**, **/usr/local/lib**, and **/usr/local/etc**).
* **Static and Dynamic Data Separation Principle**: Static data (such as binaries, libraries, and documentation) and dynamic data (such as logs, temporary files, and runtime data) are stored in different directory trees. **/usr** primarily stores static read-only data, **/var** stores variable runtime data, and **/tmp** stores temporary files.

## FreeBSD Directory Structure

For ease of explanation, only the first three levels of directories and important files are listed.

```sh
/
├── COPYRIGHT FreeBSD copyright information file
├── bin Essential BSD user utilities, see intro(1)
├── boot Programs and configuration files used during OS boot, see boot(8)
│   ├── defaults Default boot configuration files, see loader.conf(5)
│   │   └── loader.conf Boot loader configuration file, see loader.conf(5)
│   ├── device.hints Kernel variables for controlling drivers, see device.hints(5)
│   ├── dtb Compiled flattened device tree (FDT) files, see fdt(4) and dtc(1); typically empty on x86 architecture
│   │   └── overlays Compiled FDT overlays, see fdt_overlays in loader.conf(5)
│   ├── efi EFI System Partition (ESP) mount point, see uefi(8)
│   ├── firmware Loadable binary firmware kernel modules; pkg kmod installs here, as well as firmware downloaded via fwget
│   ├── fonts Binary bitmap console fonts, see loader.conf(5) and vtfontcvt(8)
│   ├── images beastie boot menu images, see loader_lua(8)
│   ├── kernel Kernel and kernel modules, see kldstat(8)
│   ├── kernel.old Alternate kernel and kernel modules
│   ├── loader.conf Loader configuration file, see loader.conf(5)
│   ├── loader.conf.d Loader supplementary configuration directory, see loader.conf(5)
│   ├── lua Lua scripts for the boot loader, including ASCII art displayed at startup, see loader_lua(8)
│   ├── modules Third-party loadable kernel modules, such as those installed via pkg(8) or ports(7)
│   ├── uboot Empty directory
│   └── zfs ZFS storage pool (Zpool) cache files, see zpool(8)
│       └── zpool.cache Hard-coded disk drive paths, see zpool(8)
├── compat Files supporting binary compatibility with other operating systems
│   └── linux Default location for Linux compatibility layer runtime, see linux(4)
├── dev Device files and special files, see intro(4) and devfs(4)
│   ├── ada0 First ATA storage device
│   ├── ada0p1 First partition of the first ATA storage device
│   ├── cd0 First optical disc drive
│   ├── cuaU0 First USB serial port, see cu(1)
│   ├── da0 First SCSI storage device
│   ├── da0s1 First partition of the first SCSI storage device
│   ├── dri Graphics card character device nodes, see drm(7)
│   ├── drm Graphics card special file nodes, see drm(7)
│   ├── fd File descriptor files, see fd(4); 0, 1, 2 in this directory correspond to standard input, standard output, and standard error
│   ├── gpt Storage partitions by GPT label, see gpt(8)
│   ├── input Device files related to input devices
│   ├── iso9660 Device nodes for ISO 9660 filesystems, such as optical discs
│   ├── mmcsd0 First SD storage card
│   ├── mmcsd0s1 First partition of the first SD storage card
│   ├── nda0 First NVMe storage device (connected via cam(4))
│   ├── nda0p1 First partition of the first NVMe storage device
│   ├── null Null device, discards all written data, returns EOF on read
│   ├── nvd0 Symbolic link to nda0 (legacy NVMe direct driver compatible name, see nda(4))
│   ├── pts Pseudo-terminal devices, see pts(4)
│   ├── random Entropy device, cryptographically strong random number source, see random(4)
│   ├── reroot Reboot device used by reboot -r
│   ├── usb USB bus
│   ├── vmm Active bhyve(8) virtual machines
│   └── zvol ZFS volumes, see zfs(8)
├── entropy Provides initial state for the random number generator, see save-entropy(8)
├── etc Base system configuration files and scripts, see intro(5)
│   ├── auto_master autofs configuration file, see automount(8)
│   ├── autofs Configuration files related to automounting, see autofs(4)
│   ├── bluetooth Bluetooth-related configuration files
│   ├── cron.d System-level cron task configuration files, see crontab(5)
│   ├── crontab Root user's crontab file
│   ├── defaults Contains a set of default configuration files, such as rc.conf and periodic.conf, see rc(8)
│   ├── devd Configuration files for the device manager (devd), such as monitoring Bluetooth and mouse plug/unplug, see devd(8)
│   ├── devfs.conf Boot-time devfs device rules configuration, see devfs.conf(5)
│   ├── dma DMA mail agent related, see dma(8)
│   ├── freebsd-update.conf Configuration file for the base system update tool freebsd-update, see freebsd-update(8)
│   ├── fstab File partition table, see fstab(5)
│   ├── gss GSSAPI-related files, including Kerberos 5
│   ├── hosts Hosts file, local IP-to-domain mapping table that takes precedence over DNS
│   ├── inetd.conf Configures BSD inetd, see inetd(8)
│   ├── jail.conf.d Modular management for jail configuration, empty by default (jail.conf(5))
│   ├── kyua Global configuration directory for the Kyua test framework (kyua(1), kyua.conf(5))
│   ├── localtime Local timezone file, see ctime(3). On the test system, localtime links to /usr/share/zoneinfo/Asia/Shanghai
│   ├── login.conf Login class capability database, see login.conf(5)
│   ├── machine-id System UUID for D-Bus use; FreeBSD generates it via the hostid_save script (same UUID as /etc/hostid, with hyphens removed), D-Bus port reads /usr/local/etc/machine-id
│   ├── mail Mail system configuration files (aliases, mailer.conf), see mailwrapper(8)
│   │   ├── aliases Addresses for delivering system mail
│   │   └── mailer.conf mailwrapper(8) configuration file
│   ├── motd.template Message displayed after TTY login, see motd(5)
│   ├── mtree System initialization and verification, can be used for system auditing, see mtree(8)
│   ├── newsyslog.conf.d newsyslog configuration files, see newsyslog.conf(5)
│   ├── ntp NTP related, see ntp.conf(5), ntpd(8)
│   ├── ntp.conf NTP client configuration file, see ntpd(8)
│   ├── pam.d Pluggable Authentication Modules (PAM) configuration files, see pam(3)
│   ├── periodic Periodic maintenance scripts, invoked by cron, see periodic(8)
│   ├── pf.conf PF firewall configuration file, see pf(4)
│   ├── pkg PKG-related configuration files, see pkg(8)
│   ├── profile.d Shell scripts executable upon user login, not automatically loaded
│   ├── rc.conf System startup configuration file, see rc.conf(5)
│   ├── rc.conf.d Configuration files for specific services, empty by default
│   ├── rc.d RC scripts for starting and managing system services, see rc(8)
│   ├── resolv.conf DNS resolution configuration file, see resolv.conf(5)
│   ├── resolvconf.conf DNS configuration manager configuration, typically generated by local-unbound, see local-unbound(8) or resolvconf(8)
│   ├── security OpenBSM audit configuration files, see audit(8)
│   ├── ssh SSH and SSHD related configuration files, see ssh(1)
│   ├── ssl SSL/TLS certificates, keys, etc.
│   │   ├── cert.pem Bundled form of the system trust store, see certctl(8)
│   │   ├── certs OpenSSL hash directory form of the system trust store, see certctl(8)
│   │   ├── openssl.cnf OpenSSL configuration file, see openssl.cnf(5)
│   │   └── untrusted Explicitly untrusted certificates, see certctl(8)
│   ├── sysctl.conf Kernel state default values, see sysctl.conf(5)
│   ├── sysctl.kld.d Configuration files for specific kernel modules, empty by default, see: D40886[EB/OL]. [2026-03-26]. <https://reviews.freebsd.org/D40886>.
│   ├── syslog.conf System log configuration file
│   ├── syslog.d syslogd configuration files, see syslogd(8)
│   ├── ttys Rules file for creating TTYs, see getty(8)
│   ├── unbound Unbound configuration files
│   ├── wpa_supplicant.conf WiFi connection configuration file, see wpa_supplicant.conf(5)
│   ├── X11 X11 related, such as XRDP
│   └── zfs ZFS-related configuration files, see zfs(8)
├── home Regular user home directories; the home directory for a typical user beastie is /home/beastie/
│   └── ykla Home directory for regular user ykla
├── lib Critical library files required by /bin and /sbin
│   ├── geom GEOM library, see geom(8)
│   └── nvmecontrol NVMe-related utilities, see nvmecontrol(8)
├── libexec System helper programs, called by binaries in /bin and /sbin
│   └── resolvconf Program for managing DNS resolution configuration, see resolvconf.conf(5)
├── media Media file mount points, such as USB drives and optical discs; see automount(8), or bsdisks(8) when using a desktop environment
├── mnt Empty directory used as a temporary mount point
├── net NFS share mount points, see auto_master(5)
├── nonexistent Non-existent directory; by convention, used as the home directory for user accounts that do not need a home directory; see /var/empty/. Daemon accounts (such as www, nobody, bind) typically have their home directory set to this path, indicating that these accounts do not need a writable home directory
├── proc Modern FreeBSD does not use procfs by default; this directory is typically empty; see procfs(4)
├── rescue Statically linked system utilities for emergency mode, see rescue(8)
├── root Root's home directory
├── sbin Essential BSD system administration utilities, see intro(8)
├── tmp Temporary files that are typically preserved after a system restart; see clear_tmp_enable in rc.conf(5)
├── usr Contains most user utilities and applications
│   ├── bin User utilities, programming tools, and applications, see intro(1)
│   ├── freebsd-dist Distribution files (such as base.txz), see release(7) and bsdinstall(8)
│   ├── include Standard C header files
│   ├── lib Shared libraries and ar(1)-type libraries, see intro(3)
│   │   ├── clang Shared libraries for the system compiler clang(1)
│   │   ├── compat Compatibility shared libraries
│   │   ├── debug Standalone debug data for kernel and base system libraries and binaries
│   │   ├── dtrace dtrace(1) library scripts
│   │   ├── engines OpenSSL (crypto/SSL toolkit) dynamically loadable engines
│   │   ├── flua FreeBSD Lua shared libraries
│   │   └── i18n Internationalization shared libraries
│   ├── lib32 32-bit compatibility libraries
│   ├── libdata Miscellaneous utility data files
│   │   ├── ldscripts Linker scripts, see ld(1)
│   │   └── pkgconfig Compiler and linker flag collections for the pkgconf(1) development tool
│   ├── libexec System daemons and utilities executed by programs
│   │   ├── bsdconfig Utilities called by the ncurses FreeBSD configuration wizard
│   │   ├── bsdinstall Utilities for bsdinstall(8)
│   │   ├── dwatch Configuration files for dwatch(1)
│   │   ├── fwget Utilities called by fwget(8)
│   │   ├── hyperv Scripts for communicating with the Hyper-V hypervisor
│   │   ├── sendmail sendmail(8) binary, see mailwrapper(8)
│   │   ├── sm.bin Restricted shell for sendmail(8), see smrsh(8)
│   │   └── zfs ZFS utilities
│   ├── local Local executables, libraries, etc., installed by pkg(7) or ports(7)
│   │   ├── bin Local user utilities, see intro(1)
│   │   ├── etc Local program configuration files
│   │   ├── include Local library header files
│   │   ├── lib Local library files
│   │   ├── lib32 Local 32-bit compatibility libraries
│   │   ├── libdata Local utility data files
│   │   ├── libexec Utilities called by local programs
│   │   ├── sbin Local administration utilities
│   │   ├── share Local architecture-independent files
│   │   ├── share/doc Local documentation
│   │   ├── share/doc/freebsd/ Articles, books, FAQ, and manuals from the FreeBSD Project
│   │   └── share/man Local manual pages, see man(1)
│   ├── obj Architecture-specific object tree for building FreeBSD from source, see build(7)
│   ├── ports FreeBSD Ports, see ports(7)
│   │   └── distfiles Downloaded source package storage location
│   ├── sbin System daemons and user-oriented administrative utilities, see intro(8)
│   ├── share Architecture-independent files
│   │   ├── atf Automated testing framework scripts, see ATF(7)
│   │   ├── bhyve bhyve(8) keyboard maps
│   │   ├── calendar System-level calendar files, see calendar(1)
│   │   ├── certs TLS certificates for openssl(1)
│   │   ├── dict Word lists, see look(1)
│   │   │   ├── freebsd FreeBSD-specific terms, proper nouns, and jargon
│   │   │   └── web2 Vocabulary from Webster's Second International Dictionary
│   │   ├── doc Miscellaneous documentation
│   │   ├── dtrace Dynamic tracing compiler scripts, see dtrace(1)
│   │   ├── examples Various examples for users and programmers
│   │   ├── firmware Firmware images loaded by user-space programs
│   │   ├── games ASCII text files used by traditional BSD games, see intro(6)
│   │   ├── keys Known trusted and revoked keys
│   │   │   └── pkg Fingerprints for pkg(7) and pkg(8)
│   │   ├── locale Localization files, see setlocale(3)
│   │   ├── man System manual pages, see man(1)
│   │   ├── misc Miscellaneous system-level files
│   │   │   ├── ascii ASCII code table
│   │   │   ├── flowers Flower meaning references
│   │   │   ├── magic Magic numbers used by file(1)
│   │   │   └── termcap Terminal capabilities database, see termcap(5)
│   │   ├── mk make templates, see make(1)
│   │   ├── nls National language support files
│   │   ├── security Security policy data files, such as mac_lomac(4)
│   │   ├── sendmail sendmail(8) configuration files
│   │   ├── skel Example dot files for new accounts
│   │   ├── snmp MIBs, example files, and tree definitions for the SNMP daemon
│   │   │   ├── defs Tree definition files for gensnmptree(1)
│   │   │   └── mibs Management Information Base (MIB) files
│   │   ├── sysroot Files required by the -sysroot compiler/linker argument to build non-native binaries
│   │   │   └── VERSION Files for FreeBSD release VERSION; "VERSION" matches uname(1) -r
│   │   │       └── MACHINE.MACHINE_ARCH Indicates the binary ABI of these files; "MACHINE" matches uname(1) -m; "MACHINE_ARCH" matches uname(1) -p
│   │   ├── vi Localization support and utilities for the vi(1) editor
│   │   ├── vt Files used by the system console, see vt(4)
│   │   │   ├── fonts Console fonts, see vidcontrol(1), vidfont(1), and vtfontcvt(8)
│   │   │   └── keymaps Console keyboard maps, see kbdcontrol(1) and kbdmap(1)
│   │   └── zoneinfo Timezone configuration information, see tzfile(5)
│   ├── src FreeBSD source code, see development(7); the layout of the source tree is described in the top-level README.md file
│   └── tests FreeBSD test suite, see tests(7)
├── var Multi-purpose log, temporary, transient, and cache files
│   ├── account Empty by default, used for system auditing, see accton(8)
│   │   └── acct Execution audit file, see acct(5)
│   ├── at Stores task files scheduled by the at command, see at(1)
│   │   ├── jobs Job files
│   │   └── spool Output spool files
│   ├── audit Stores security audit log files, belongs to the audit group, see audit(8)
│   ├── authpf Shell for authenticated gateway users, see authpf(8), empty by default
│   ├── backups Stores system backup files, such as usernames and keys, pkg database. Generated by files 200, 210, etc. under /etc/periodic/daily
│   ├── cache Cache files
│   │   ├── cups CUPS cached printers, see cups(1)
│   │   └── pkg pkg(8) cached packages
│   ├── crash Stores crash dump files, see crash(8) and savecore(8)
│   ├── cron Stores cron task-related files, see cron(8)
│   │   └── tabs crontab files, see crontab(5)
│   ├── db Auto-generated system-specific database files
│   │   ├── etcupdate Temporary files and logs for etcupdate(8)
│   │   ├── freebsd-update Download and temporary files for freebsd-update(8)
│   │   └── pkg Package database
│   ├── empty Empty by default, intended to provide a directory that always remains empty for use by specific programs①
│   ├── games Stores game-related data files, empty by default
│   ├── heimdal For Kerberos 5, empty by default, see kdc(8)
│   ├── lib State information for ported Linux applications
│   ├── log Various system log files
│   │   ├── Xorg.0.log X server log (if X(7) is installed), rotated to Xorg.0.log.old
│   │   ├── auth.log System authentication log
│   │   ├── bsdinstall_log System installation log
│   │   ├── cron Cron task log, see cron(8)
│   │   ├── cups CUPS log, see cups(1)
│   │   ├── daemon.log Default log for system daemons
│   │   ├── debug.log Undiscarded debug syslog messages
│   │   ├── devd.log Default log for the device state change daemon
│   │   ├── dmesg.today System message buffer log, rotated to dmesg.yesterday
│   │   ├── maillog Mail system log, rotated and compressed to maillog.0.bz2
│   │   ├── messages General system log, see syslogd(8)
│   │   ├── mount.today Currently mounted fstab(5) entries, rotated to mount.yesterday
│   │   ├── pf.today Packet filter firewall log, see pf(4)
│   │   ├── pflog Saved packets captured by pflogd(8)
│   │   ├── security Security event log
│   │   ├── setuid.today List of executables running with elevated privileges, rotated to setuid.yesterday
│   │   ├── userlog User or group change log
│   │   ├── utx.lastlogin Last login log, see getutxent(3)
│   │   └── utx.log Login/logout log, see getutxent(3)
│   ├── mail System mail, user mailbox files
│   ├── msgs Stores system message files, see msgs(1)
│   ├── quotas UFS quota information files
│   ├── run Used for PID files and runtime data, contains operating system information since system startup
│   │   ├── bhyve unix(4) domain sockets for bhyve(8) virtual machines
│   │   ├── utx.active Current user database, see getutxent(3)
│   │   └── wpa_supplicant IEEE 802.11 WiFi runtime files
│   ├── spool Stores task files waiting to be processed, such as files pending printing
│   │   ├── clientmqueue Undelivered submission mail queue, see sendmail(8)
│   │   ├── cups CUPS print jobs and temporary files, see cups(1)
│   │   ├── dma Undelivered mail queue for the DragonFly mail agent, see dma(8)
│   │   ├── lock Serial device locks, see uucplock(3)
│   │   └── mqueue Undelivered mail queue for sendmail(8)
│   ├── tmp Temporary files that are typically preserved after a system restart
│   │   └── vi.recover Recovery files for the vi(1) editor
│   ├── unbound Unbound server-related files and configuration, see unbound(8)
│   └── yp NIS configuration and other files, see yp(8)
└── zroot Mount point directory automatically generated by ZFS when creating the storage pool "zroot"; zroot is the default root pool name used by the FreeBSD installer (see zpool(8) and zfs(8) mountpoint property). This directory itself is typically empty; its sub-filesystems (such as zroot/ROOT, zroot/usr, zroot/var, etc.) are mounted to their respective paths; content only appears in this directory when files are created directly under the zpool root dataset
```

①: The directory **/var/empty** has the schg flag set, which is the system immutable flag.

```sh
# ls -lod /var/empty
dr-xr-xr-x   2 root    wheel   schg  2 Apr 13 12:38 /var/empty
```

Parameter explanation: In the long format (`-l`) output, include file flags (`-o`), and list directories as regular files without recursion (`-d`).

> **Tip**
>
> OpenSSH uses a privilege separation architecture, where the chroot directory for the pre-authentication phase is **/var/empty**, which must be empty and writable only by root.

## Devices and Device Nodes

A device is a primary concept in the system related to hardware activity, including disks, printers, graphics cards, and keyboards.

Each device has a device name and number. For example, `ada0` is the first SATA hard disk, and `kbd0` represents the keyboard.

Most devices in FreeBSD are accessed through special files called device nodes, which are located in the **/dev** directory.

In FreeBSD, device nodes are automatically managed by the devfs(4) filesystem. devfs is a virtual filesystem that is automatically mounted to **/dev** by the kernel at system startup, and dynamically creates and removes device nodes based on the hardware devices currently present in the system. This differs from traditional UNIX systems that require manually creating device nodes using the `mknod` command. devfs ensures that the **/dev** directory only contains device nodes for devices that actually exist on the current system.

In traditional UNIX, device nodes are divided into two types: character devices and block devices. Character devices access data as a byte stream, such as terminals (**/dev/ttyv0**) and serial ports; block devices access data in fixed-size blocks through the operating system's buffer cache. However, in modern FreeBSD, block devices have been removed, and all device nodes are character devices.

In the output of `ls -l /dev/`, all devices are displayed as `c` (character device), and the `b` (block device) identifier will not appear.

For example, the disk **/dev/ada0** is a character device on modern FreeBSD, not a block device.

```sh
crw-r-----  1 root operator 0x69 May 10 09:49 ada0
```

Device naming follows certain conventions:

| Device Type                             | Prefix | Example        | Description             |
| --------------------------------------- | ------ | -------------- | ----------------------- |
| SATA hard disks                         | `ada`  | `ada0`, `ada1` | Numbering starts from 0 |
| SCSI hard disks and USB storage devices | `da`   | `da0`          | Numbering starts from 0 |
| NVMe storage (CAM framework)            | `nda`  | `nda0`         | Default                 |
| NVMe storage (non-CAM)                  | `nvd`  | `nvd0`         | Legacy compatible alias |
| CD-ROM drives                           | `cd`   | `cd0`          | Numbering starts from 0 |

GPT partitions append `p` plus the partition number after the device name (e.g., `ada0p1`), and MBR slices append `s` plus the slice number (e.g., `ada0s1`).

As shown below:

```sh
crw-r-----  1 root operator 0x69 May 10 09:49 ada0	# SATA hard disk
crw-r-----  1 root operator 0x7c May 10 09:56 ada0s1	# First slice of SATA hard disk MBR partition
crw-r-----  1 root operator 0x6b May 10 09:49 da0	# SCSI hard disk
crw-r-----  1 root operator 0x60 May 10 09:49 nda0	# NVMe hard disk
crw-r-----  1 root operator 0x62 May 10 09:49 nda0p1	# First partition of GPT partition
lrwxr-xr-x  1 root wheel       4 May 10 09:49 nvd0 -> nda0	# Compatible alias for nda0 (legacy NVMe direct driver compatible name)
lrwxr-xr-x  1 root wheel       6 May 10 09:49 nvd0p1 -> nda0p1	# Compatible alias for nda0p1
crw-r-----  1 root operator 0x68 May 10 09:49 cd0	# Optical media
```

## References

* Linux Foundation. Filesystem Hierarchy Standard 3.0\[EB/OL]. (2015-06-03)\[2026-04-23]. <https://refspecs.linuxfoundation.org/fhs.shtml>.
* FreeBSD Project. hier(7)\[EB/OL]. \[2026-03-26]. <https://man.freebsd.org/cgi/man.cgi?query=hier&sektion=7>. Systematic description of the FreeBSD filesystem hierarchy.
* FreeBSD Project. chflags(1)\[EB/OL]. \[2026-04-17]. <https://man.freebsd.org/cgi/man.cgi?query=chflags&sektion=1>.
* FreeBSD Project. ls(1)\[EB/OL]. \[2026-04-17]. <https://man.freebsd.org/cgi/man.cgi?query=ls&sektion=1>.

## Exercises

1. Review the definition of hier(7) in the FreeBSD source code and analyze the hierarchical principles followed in its directory structure design.
2. Modify the default permission configuration of the **/tmp** directory (e.g., change permissions from `1777` to `1755`), and record the impact on temporary file creation and system service operation after the modification.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://book.bsdcn.org/ask/flat/chapter-17-system-administration/di-17.1-jie-xi-tong-mu-lu-jie-gou.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
