1.\" Copyright (c) 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 3. Neither the name of the University nor the names of its contributors 13.\" may be used to endorse or promote products derived from this software 14.\" without specific prior written permission. 15.\" 16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26.\" SUCH DAMAGE. 27.\" 28.\" @(#)hier.7 8.1 (Berkeley) 6/5/93 29.\" $FreeBSD$ 30.\" 31.Dd June 29, 2023 32.Dt HIER 7 33.Os 34.Sh NAME 35.Nm hier 36.Nd layout of file systems 37.Sh SYNOPSIS 38An overview of the file system hierarchy. 39.Sh DESCRIPTION 40.Bl -tag -width "/libexec/" 41.It Pa / 42root directory 43.It Pa /bin/ 44user utilities that are fundamental to single-user and multi-user modes 45.It Pa /boot/ 46programs and configuration files used during bootstrap of the operating system 47.Pp 48.Bl -tag -width "nvmecontrol/" -compact 49.It Pa defaults/ 50default bootstrap configuration files; see 51.Xr loader.conf 5 52.It Pa dtb/ 53compiled flattened device tree (FDT) files; see 54.Xr fdt 4 55and 56.Xr dtc 1 57.Pp 58.Bl -tag -width "overlays/" -compact 59.It Pa overlays/ 60compiled flattened device tree (FDT) overlays; these can be applied using the 61.Va fdt_overlays 62setting in 63.Xr loader.conf 5 64.El 65.Pp 66.It Pa efi/ 67mount point for the EFI System Partition (ESP) on UEFI systems 68.It Pa firmware/ 69loadable kernel modules containing binary firmware, for hardware to which 70firmware must be downloaded 71.It Pa kernel/ 72pure kernel executable (the operating system loaded into memory at boot time) 73and kernel modules 74.It Pa modules/ 75third-party loadable kernel modules, such as those associated with 76.Xr ports 7 77.It Pa zfs/ 78.Xr zfs 8 79pool cache files 80.El 81.It Pa /compat/ 82normally a link to 83.Pa /usr/compat . 84If not, then the 85.Pa /usr/compat 86comments apply 87.It Pa /dev/ 88the normal mount point for 89.Xr devfs 5 90.Pp 91.Bl -tag -width "nvmecontrol/" -compact 92.It Pa fd/ 93file descriptor files; see 94.Xr fd 4 95.El 96.It Pa /etc/ 97system configuration files and scripts 98.Pp 99.Bl -tag -width "nvmecontrol/" -compact 100.It Pa bluetooth/ 101bluetooth configuration files 102.It Pa defaults/ 103default system configuration files; see 104.Xr rc 8 105.It Pa localtime 106local timezone information; see 107.Xr ctime 3 108.It Pa mail/ 109.Xr sendmail 8 110control files 111.It Pa mtree/ 112.Xr mtree 8 113configuration files 114.It Pa pam.d/ 115configuration files for the Pluggable Authentication Modules (PAM) library; see 116.Xr pam 3 117.It Pa periodic/ 118scripts that are run daily, weekly, or monthly by 119.Xr cron 8 ; 120see 121.Xr periodic 8 122.It Pa ppp/ 123PPP configuration files; see 124.Xr ppp 8 125.It Pa rc.d/ 126system and daemon startup/control scripts; see 127.Xr rc 8 128.It Pa security/ 129OpenBSM audit configuration files; see 130.Xr audit 8 131.It Pa ssh/ 132OpenSSH configuration files; see 133.Xr ssh 1 134.It Pa ssl/ 135OpenSSL configuration files 136.El 137.It Pa /home/ 138users' home directories; whilst the layout is not standardized, the typical home for an interactive user 139.Dv beastie 140would be 141.Pa /home/beastie/ 142.It Pa /lib/ 143system libraries that are critical to binaries in 144.Pa /bin 145and 146.Pa /sbin 147.Pp 148.Bl -tag -width "nvmecontrol/" -compact 149.It Pa casper/ 150service-specific 151.Xr libcasper 3 152Capsicum support libraries 153.It Pa geom/ 154class-specific libraries for the 155.Xr geom 8 156utility 157.It Pa nvmecontrol/ 158vendor-specific libraries to extend the 159.Xr nvmecontrol 8 160utility 161.El 162.It Pa /libexec/ 163system utilities that are critical to binaries in 164.Pa /bin 165and 166.Pa /sbin 167.It Pa /media/ 168empty directory commonly containing mount points for removable media such as 169USB drives, CDs, and DVDs 170.It Pa /mnt/ 171empty directory commonly used by system administrators as a temporary mount 172point 173.It Pa /net/ 174automounted NFS shares; see 175.Xr auto_master 5 176.It Pa /nonexistent/ 177a non-existent directory; conventionally, a home directory for special user 178accounts that do not require a home directory. See also 179.Pa /var/empty/ 180.It Pa /proc/ 181process file system; see 182.Xr procfs 5 183.It Pa /rescue/ 184statically-linked programs for emergency recovery; see 185.Xr rescue 8 186.It Pa /root/ 187home directory of the root user 188.It Pa /sbin/ 189system programs and administration utilities that are fundamental to 190single-user and multi-user modes 191.It Pa /tmp/ 192temporary files that may be removed by 193.Xr rc 8 ; 194see the 195.Va clear_tmp_enable 196variable of 197.Xr rc.conf 5 198.It Pa /usr/ 199contains the majority of user utilities and applications 200.Pp 201.Bl -tag -width "freebsd-dist/" -compact 202.It Pa bin/ 203common utilities, programming tools, and applications 204.It Pa compat/ 205files needed to support binary compatibility with other operating systems; see 206.Xr linux 4 207.It Pa freebsd-dist/ 208distribution files 209.Pq like base.txz ; see 210.Xr release 7 211and 212.Xr bsdinstall 8 213.It Pa include/ 214standard C include files 215.It Pa lib/ 216shared and archive 217.Xr ar 1 Ns -type 218libraries 219.Pp 220.Bl -tag -width Fl -compact 221.It Pa compat/ 222shared libraries for compatibility 223.It Pa debug/ 224standalone debug data for the kernel and base system libraries and binaries 225.It Pa dtrace/ 226DTrace library scripts 227.It Pa engines/ 228OpenSSL (Cryptography/SSL toolkit) dynamically loadable engines 229.El 230.Pp 231.It Pa libdata/ 232miscellaneous utility data files 233.Pp 234.Bl -tag -width Fl -compact 235.It Pa gcc/ 236GCC configuration data 237.It Pa ldscripts/ 238linker scripts; see 239.Xr ld 1 240.It Pa pkgconfig/ 241.Xr pc 5 Pq Pa ports/devel/pkgconf 242files; collections of compiler flags, linker flags, and other information 243relevant to library use 244.El 245.Pp 246.It Pa libexec/ 247system daemons and system utilities that are executed by other programs 248.Pp 249.Bl -tag -width Fl -compact 250.It Pa aout/ 251utilities to manipulate a.out executables 252.It Pa elf/ 253utilities to manipulate ELF executables 254.It Pa lpr/ 255utilities and filters for LP print system; see 256.Xr lpr 1 257.It Pa sendmail/ 258the 259.Xr sendmail 8 260binary; see 261.Xr mailwrapper 8 262.It Pa sm.bin/ 263restricted shell for 264.Xr sendmail 8 ; 265see 266.Xr smrsh 8 267.El 268.Pp 269.It Pa local/ 270local executables, libraries, etc. 271Also used as the default destination for the 272.Xr ports 7 273framework. 274Within 275.Pa local/ , 276the general layout sketched out by 277.Nm 278for 279.Pa /usr 280should be used. 281Exceptions are the ports documentation 282.Po in 283.Pa share/doc/<port>/ Ns Pc , 284and 285.Pa /usr/local/etc 286.Po mimics 287.Pa /etc Ns Pc . 288.It Pa obj/ 289architecture-specific target tree produced by building 290.Fx 291from source; see 292.Xr build 7 293.It Pa ports/ 294.Fx 295ports collection; see 296.Xr ports 7 297.It Pa sbin/ 298system daemons and system utilities that are executed by users 299.It Pa share/ 300architecture-independent files 301.Pp 302.Bl -tag -width Fl -compact 303.It Pa calendar/ 304system-wide calendar files; see 305.Xr calendar 1 306.It Pa dict/ 307word lists; see 308.Xr look 1 309.Pp 310.Bl -tag -width Fl -compact 311.It Pa freebsd 312.Fx Ns -specific 313terms, proper names, and jargon 314.It Pa web2 315words from Webster's Second International 316.El 317.Pp 318.It Pa doc/ 319miscellaneous documentation 320.It Pa examples/ 321various examples for users and programmers 322.It Pa firmware/ 323firmware images loaded by userland programs 324.It Pa games/ 325used by various games 326.It Pa keys/ 327known trusted and revoked keys 328.Pp 329.Bl -tag -width Fl -compact 330.It Pa pkg/ 331fingerprints for 332.Xr pkg 7 333and 334.Xr pkg 8 335.El 336.Pp 337.It Pa locale/ 338localization files; see 339.Xr setlocale 3 340.It Pa man/ 341manual pages 342.It Pa misc/ 343miscellaneous system-wide files 344.Pp 345.Bl -tag -width Fl -compact 346.It Pa termcap 347terminal characteristics database; see 348.Xr termcap 5 349.El 350.Pp 351.It Pa mk/ 352templates for make; see 353.Xr make 1 354.It Pa nls/ 355national language support files 356.It Pa security/ 357data files for security policies such as 358.Xr mac_lomac 4 359.It Pa sendmail/ 360.Xr sendmail 8 361configuration files 362.It Pa skel/ 363example 364.Pa .\& 365(dot) files for new accounts 366.It Pa snmp/ 367MIBs, example files and tree definitions for the SNMP daemon 368.Pp 369.Bl -tag -width Fl -compact 370.It Pa defs/ 371tree definition files for use with 372.Xr gensnmptree 1 373.It Pa mibs/ 374MIB files 375.El 376.Pp 377.It Pa syscons/ 378.Xr syscons 4 379files 380.Pp 381.Bl -tag -width Fl -compact 382.It Pa fonts/ 383console fonts; see 384.Xr vidcontrol 1 385and 386.Xr vidfont 1 387.It Pa keymaps/ 388console keyboard maps; see 389.Xr kbdcontrol 1 390and 391.Xr kbdmap 1 392.It Pa scrnmaps/ 393console screen maps 394.El 395.Pp 396.It Pa sysroot/ 397files necessary for the -sysroot compiler/linker argument to build non-native 398binaries 399.Pp 400.Bl -tag -width Fl -compact 401.It Pa VERSION/ 402files for 403.Fx 404release VERSION. 405By convention, 406.Dq VERSION 407matches 408.Xr uname 1 409.Fl r . 410.Pp 411.Bl -tag -width Fl -compact 412.It Pa MACHINE.MACHINE_ARCH/ 413represent the binary ABI for these files. 414.Dq MACHINE 415matches 416.Xr uname 1 417.Fl m . 418.Dq MACHINE_ARCH 419matches 420.Xr uname 1 421.Fl p . 422.El 423.El 424.Pp 425.It Pa tabset/ 426tab description files for a variety of terminals; used in the termcap file; 427see 428.Xr termcap 5 429.It Pa vi/ 430localization support and utilities for 431.Xr vi 1 432.It Pa vt/ 433.Xr vt 4 434files 435.Pp 436.Bl -tag -width Fl -compact 437.It Pa fonts/ 438console fonts; see 439.Xr vidcontrol 1 440and 441.Xr vidfont 1 442.It Pa keymaps/ 443console keyboard maps; see 444.Xr kbdcontrol 1 445and 446.Xr kbdmap 1 447.\" .It Pa scrnmaps/ 448.\" console screen maps 449.El 450.Pp 451.It Pa zoneinfo/ 452timezone configuration information; see 453.Xr tzfile 5 454.El 455.Pp 456.It Pa src/ 457.Fx 458source code; see 459.Xr development 7 . 460The layout of the source tree is described by the top-level 461.Pa README.md 462file. 463.Pp 464.It Pa tests/ 465the 466.Fx 467test suite; see 468.Xr tests 7 469.El 470.It Pa /var/ 471log, temporary, transient, and spool files 472.Pp 473.Bl -tag -width "preserve/" -compact 474.It Pa account/ 475system accounting files 476.Pp 477.Bl -tag -width Fl -compact 478.It Pa acct 479execution accounting file; see 480.Xr acct 5 481.El 482.Pp 483.It Pa at/ 484timed command scheduling files; see 485.Xr at 1 486.Pp 487.Bl -tag -width Fl -compact 488.It Pa jobs/ 489job files 490.It Pa spool/ 491output spool files 492.El 493.Pp 494.It Pa backups/ 495miscellaneous backup files 496.It Pa cache/ 497miscellaneous cache files 498.Pp 499.Bl -tag -width Fl -compact 500.It Pa pkg/ 501cached packages for 502.Xr pkg 8 503.El 504.Pp 505.It Pa crash/ 506default directory for kernel crash dumps; see 507.Xr crash 8 508and 509.Xr savecore 8 510.It Pa cron/ 511.Xr cron 8 512files 513.Pp 514.Bl -tag -width Fl -compact 515.It Pa tabs/ 516.Xr crontab 5 517files 518.El 519.Pp 520.It Pa db/ 521miscellaneous automatically-generated system-specific database files 522.Pp 523.Bl -tag -width "freebsd-update/" -compact 524.It Pa freebsd-update/ 525temporary files and downloads for 526.Xr freebsd-update 8 527.El 528.Pp 529.It Pa empty/ 530for use by programs that require an empty directory. 531Uses include privilege separation by 532.Xr sshd 8 533.It Pa games/ 534miscellaneous game status and score files 535.It Pa heimdal/ 536Kerberos server databases; see 537.Xr kdc 8 538.It Pa log/ 539miscellaneous system log files 540.Pp 541.Bl -tag -width "utx.lastlogin" -compact 542.It Pa utx.lastlogin 543last login log; see 544.Xr getutxent 3 545.It Pa utx.log 546login/logout log; see 547.Xr getutxent 3 548.El 549.Pp 550.It Pa mail/ 551user mailbox files 552.It Pa msgs/ 553system messages database; see 554.Xr msgs 1 555.It Pa preserve/ 556unused, present for historical reasons 557.It Pa quotas/ 558file system quota information files 559.It Pa run/ 560files containing information about the operating system since it was booted 561.Pp 562.Bl -tag -width Fl -compact 563.It Pa bhyve/ 564.Xr bhyve 8 565virtual machine 566.Xr unix 4 Ns -domain sockets 567.It Pa ppp/ 568writable by the 569.Dq network 570group for command connection sockets; see 571.Xr ppp 8 572.It Pa utx.active 573database of current users; see 574.Xr getutxent 3 575.El 576.Pp 577.It Pa rwho/ 578rwho data files; see 579.Xr rwhod 8 , 580.Xr rwho 1 , 581and 582.Xr ruptime 1 583.It Pa spool/ 584miscellaneous printer and mail system spooling directories 585.Pp 586.Bl -tag -width "clientmqueue/" -compact 587.It Pa clientmqueue/ 588undelivered submission mail queue; see 589.Xr sendmail 8 590.It Pa ftp/ 591ftp root directory; see 592.Xr ftpd 8 593.It Pa mqueue/ 594undelivered mail queue; see 595.Xr sendmail 8 596.It Pa output/ 597line printer spooling directories 598.El 599.Pp 600.It Pa tmp/ 601temporary files that are not removed by 602.Xr rc 8 603.Pp 604.Bl -tag -width "vi.recover/" -compact 605.It Pa vi.recover/ 606.Xr vi 1 607recovery files 608.El 609.Pp 610.It Pa yp/ 611the NIS maps; see 612.Xr yp 8 613.El 614.El 615.Sh NOTES 616This manual page documents the default 617.Fx 618file system layout. 619The actual hierarchy on a given system is defined at the system 620administrator's discretion. 621A well-maintained installation will include a customized version of 622this document. 623.Sh SEE ALSO 624.Xr apropos 1 , 625.Xr find 1 , 626.Xr grep 1 , 627.Xr ls 1 , 628.Xr whereis 1 , 629.Xr which 1 630.Sh HISTORY 631A 632.Nm 633manual page appeared in 634.At v7 . 635