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