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