17.1 System Directory Structure
Directory Structure Overview
Design Principles of FreeBSD Directory Structure
FreeBSD Directory Structure
/
├── 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 datasetDevices and Device Nodes
Device Type
Prefix
Example
Description
References
Exercises
Last updated