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 January 27, 2018 32.Dt HIER 7 33.Os 34.Sh NAME 35.Nm hier 36.Nd layout of file systems 37.Sh DESCRIPTION 38A sketch of the file system hierarchy. 39.Bl -tag -width "/libexec/" 40.It Pa / 41root directory of the file system 42.It Pa /bin/ 43user utilities fundamental to both single-user and multi-user environments 44.It Pa /boot/ 45programs and configuration files used during operating system bootstrap 46.Pp 47.Bl -tag -width "defaults/" -compact 48.It Pa defaults/ 49default bootstrapping configuration files; see 50.Xr loader.conf 5 51.It Pa dtb/ 52Compiled flattened device tree (FDT) files; see 53.Xr fdt 4 54and 55.Xr dtc 1 56.It Pa firmware/ 57loadable kernel modules containing binary firmware for hardware that needs 58firmware downloaded to it to function 59.It Pa kernel/ 60pure kernel executable (the operating system loaded into memory 61at boot time) and kernel modules 62.It Pa modules/ 63third-party loadable kernel modules; 64see 65.Xr kldstat 8 66.It Pa overlays/ 67Compiled flattened device tree (FDT) overlays; see 68.Xr fdt 4 69and 70.Xr dtc 1 71.It Pa zfs/ 72.Xr zfs 8 73zpool cache files 74.El 75.It Pa /cdrom/ 76default mount point for CD-ROM drives 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 "net/" -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 "bluetooth/" -compact 97.It Pa defaults/ 98default system configuration files; 99see 100.Xr rc 8 101.It Pa bluetooth/ 102bluetooth configuration files 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 rc.d/ 122system and daemon startup/control scripts; 123see 124.Xr rc 8 125.It Pa security/ 126OpenBSM audit configuration files; 127see 128.Xr audit 8 129.It Pa ppp/ 130ppp configuration files; 131see 132.Xr ppp 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 /lib/ 141critical system libraries needed for binaries in 142.Pa /bin 143and 144.Pa /sbin 145.Pp 146.Bl -tag -width "geom/" -compact 147.It Pa geom/ 148class-specific libraries for the 149.Xr geom 8 150utility 151.El 152.It Pa /libexec/ 153critical system utilities needed for binaries in 154.Pa /bin 155and 156.Pa /sbin 157.It Pa /media/ 158contains subdirectories to be used as mount points 159for removable media such as CDs, USB drives, and 160floppy disks 161.It Pa /mnt/ 162empty directory commonly used by 163system administrators as a temporary mount point 164.It Pa /net/ 165automounted NFS shares; 166see 167.Xr auto_master 5 168.It Pa /proc/ 169process file system; 170see 171.Xr procfs 5 172.It Pa /rescue/ 173statically linked programs for emergency recovery; 174see 175.Xr rescue 8 176.It Pa /root/ 177root's HOME directory 178.It Pa /sbin/ 179system programs and administration utilities 180fundamental to both single-user and multi-user environments 181.It Pa /tmp/ 182temporary files that are not guaranteed to persist across system reboots 183.It Pa /usr/ 184contains the majority of user utilities and applications 185.Pp 186.Bl -tag -width "libdata/" -compact 187.It Pa bin/ 188common utilities, programming tools, and applications 189.It Pa compat/ 190files needed to support binary compatibility with other operating systems, 191such as Linux 192.It Pa include/ 193standard C include files 194.Pp 195.Bl -tag -width "kerberos5/" -compact 196.It Pa arpa/ 197C include files for Internet service protocols 198.It Pa bsnmp/ 199C include files for the SNMP daemon 200.It Pa c++/ 201C++ include files 202.It Pa cam/ 203C include files for the Common Access Methods Layer 204.Bl -tag -width "kerberos5/" -compact 205.It Pa scsi/ 206SCSI device on top of CAM 207.El 208.It Pa dev/ 209C include files for programming various 210.Fx 211devices 212.Bl -tag -width "kerberos5/" -compact 213.It Pa ic/ 214various header files describing driver- and bus-independent 215hardware circuits 216.It Pa ofw/ 217Open Firmware support 218.It Pa pbio/ 2198255 PPI cards; 220see 221.Xr pbio 4 222.It Pa ppbus/ 223parallel port bus; 224see 225.Xr ppbus 4 226.It Pa usb/ 227USB subsystem 228.It Pa wi/ 229.Xr wi 4 230WaveLAN driver 231.El 232.It Pa fs/ 233.Bl -tag -width "kerberos5/" -compact 234.It Pa fdescfs/ 235per-process file descriptors file system 236.It Pa msdosfs/ 237MS-DOS file system 238.It Pa nfs/ 239C include files for NFS (Network File System) version 2, 3 and 4 240.It Pa nullfs/ 241loopback file system 242.It Pa procfs/ 243process file system 244.It Pa smbfs/ 245SMB/CIFS file system 246.It Pa udf/ 247UDF file system 248.It Pa unionfs 249union file system 250.El 251.It Pa geom/ 252GEOM framework 253.Bl -tag -width "kerberos5/" -compact 254.It Pa concat/ 255CONCAT GEOM class 256.It Pa gate/ 257GATE GEOM class 258.It Pa mirror/ 259MIRROR GEOM class 260.It Pa nop/ 261NOP GEOM class 262.It Pa raid3/ 263RAID3 GEOM class 264.It Pa stripe/ 265STRIPE GEOM class 266.El 267.Pp 268.It Pa libmilter/ 269C include files for libmilter, 270the 271.Xr sendmail 8 272mail filter API 273.It Pa machine/ 274machine-specific C include files 275.It Pa net/ 276miscellaneous network C include files 277.Bl -tag -width "altq/" -compact 278.It Pa altq/ 279C include files for alternate queueing 280.El 281.It Pa net80211/ 282C include files for 802.11 wireless networking; 283see 284.Xr net80211 4 285.It Pa netinet/ 286C include files for Internet standard protocols; 287see 288.Xr inet 4 289.It Pa netinet6/ 290C include files for Internet protocol version 6; 291see 292.Xr inet6 4 293.It Pa netipsec/ 294kernel key-management service; 295see 296.Xr ipsec 4 297.It Pa netsmb/ 298SMB/CIFS requester 299.It Pa nfs/ 300C include files for NFS (Network File System) version 2 and 3 (legacy) 301.It Pa openssl/ 302OpenSSL (Cryptography/SSL toolkit) headers 303.It Pa protocols/ 304C include files for Berkeley service protocols 305.It Pa rpc/ 306remote procedure calls; 307see 308.Xr rpc 3 309.It Pa rpcsvc/ 310definition of RPC service structures; see 311.Xr rpc 3 312.It Pa security/ 313PAM; see 314.Xr pam 8 315.It Pa sys/ 316system C include files (kernel data structures) 317.\" .It Pa tcl/ 318.\" Tcl language; 319.\" see 320.\" .Xr Tcl n 321.\" .Bl -tag -width "kerberos5/" -compact 322.\" .It Pa generic/ 323.\" ??? 324.\" .It Pa unix/ 325.\" ??? 326.\" .El 327.It Pa ufs/ 328C include files for UFS (The U-word File System) 329.Bl -tag -width "kerberos5/" -compact 330.It Pa ffs/ 331Fast file system 332.It Pa ufs/ 333UFS file system 334.El 335.It Pa vm/ 336virtual memory; 337see 338.Xr vmstat 8 339.El 340.Pp 341.It Pa lib/ 342shared and archive 343.Xr ar 1 Ns -type 344libraries 345.Bl -tag -width Fl -compact 346.It Pa aout/ 347a.out archive libraries 348.It Pa compat/ 349shared libraries for compatibility 350.Bl -tag -width Fl -compact 351.It Pa aout/ 352a.out backward compatibility libraries 353.El 354.It Pa debug/ 355standalone debug data for the kernel and base system libraries and binaries 356.It Pa dtrace/ 357DTrace library scripts 358.It Pa engines/ 359OpenSSL (Cryptography/SSL toolkit) dynamically loadable engines 360.El 361.Pp 362.It Pa libdata/ 363miscellaneous utility data files 364.Bl -tag -width Fl -compact 365.It Pa gcc/ 366.Xr gcc 1 367configuration data 368.It Pa ldscripts/ 369linker scripts; 370see 371.Xr ld 1 372.El 373.Pp 374.It Pa libexec/ 375system daemons & system utilities (executed by other programs) 376.Bl -tag -width Fl -compact 377.It Pa aout/ 378utilities to manipulate a.out executables 379.It Pa elf/ 380utilities to manipulate ELF executables 381.It Pa lpr/ 382utilities and filters for LP print system; 383see 384.Xr lpr 1 385.It Pa sendmail/ 386the 387.Xr sendmail 8 388binary; 389see 390.Xr mailwrapper 8 391.It Pa sm.bin/ 392restricted shell for 393.Xr sendmail 8 ; 394see 395.Xr smrsh 8 396.El 397.Pp 398.It Pa local/ 399local executables, libraries, etc. 400Also used as the default destination for the 401.Xr ports 7 402framework. 403Within 404.Pa local/ , 405the general layout sketched out by 406.Nm 407for 408.Pa /usr 409should be used. 410Exceptions are the 411.Pa man 412directory 413.Po directly under 414.Pa local/ 415rather than under 416.Pa local/share/ Ns Pc , 417ports documentation 418.Po in 419.Pa share/doc/<port>/ Ns Pc , 420and 421.Pa /usr/local/etc 422.Po mimics 423.Pa /etc Ns Pc . 424.It Pa obj/ 425architecture-specific target tree produced by building the 426.Pa /usr/src 427tree 428.It Pa ports/ 429.Xr ports 7 , 430the 431.Fx 432ports collection. 433.It Pa sbin/ 434system daemons & system utilities (executed by users) 435.It Pa share/ 436architecture-independent files 437.Pp 438.Bl -tag -width "calendar/" -compact 439.It Pa calendar/ 440a variety of pre-fab calendar files; 441see 442.Xr calendar 1 443.It Pa dict/ 444word lists; 445see 446.Xr look 1 447.Pp 448.Bl -tag -width Fl -compact 449.It Pa freebsd 450.Fx Ns -specific 451terms, proper names, and jargon 452.It Pa web2 453words from Webster's 2nd International 454.El 455.Pp 456.It Pa doc/ 457miscellaneous documentation; 458source for most of the printed 459.Bx 460manuals (available 461from the 462.Tn USENIX 463association) 464.Bl -tag -width Fl -compact 465.It Pa FAQ/ 466Frequently Asked Questions 467.It Pa IPv6/ 468implementation notes for IPv6 469.It Pa es/ 470Spanish translations of documents in /usr/share/doc 471.It Pa handbook/ 472.Fx 473Handbook 474.It Pa ja/ 475Japanese translations of documents in /usr/share/doc 476.It Pa legal/ 477License files for vendor supplied firmwares 478.It Pa ncurses/ 479HTML documents pertaining to ncurses; 480see 481.Xr ncurses 3 482.It Pa ntp/ 483HTML documents pertaining to the Network Time Protocol 484.It Pa ru/ 485Russian translations of documents in /usr/share/doc 486.It Pa tutorials/ 487.Fx 488tutorials 489.It Pa zh/ 490Chinese translations of documents in /usr/share/doc 491.El 492.Pp 493.It Pa examples/ 494various examples for users and programmers 495.It Pa firmware/ 496firmware images loaded by userland programs 497.It Pa games/ 498ASCII text files used by various games 499.It Pa keys/ 500known trusted and revoked keys. 501.Bl -tag -width "pkg/" -compact 502.It Pa pkg/ 503fingerprints for 504.Xr pkg 7 505and 506.Xr pkg 8 507.El 508.Pp 509.It Pa locale/ 510localization files; 511see 512.Xr setlocale 3 513.It Pa man/ 514manual pages 515.It Pa misc/ 516miscellaneous system-wide ASCII text files 517.Bl -tag -width Fl -compact 518.It Pa fonts/ 519??? 520.It Pa termcap 521terminal characteristics database; 522see 523.Xr termcap 5 524.El 525.It Pa mk/ 526templates for make; 527see 528.Xr make 1 529.It Pa nls/ 530national language support files; 531see 532.Xr mklocale 1 533.It Pa security/ 534data files for security policies such as 535.Xr mac_lomac 4 536.It Pa sendmail/ 537.Xr sendmail 8 538configuration files 539.It Pa skel/ 540example 541.Pa .\& 542(dot) files for new accounts 543.It Pa snmp/ 544MIBs, example files and tree definitions for the SNMP daemon. 545.Bl -tag -width Fl -compact 546.It Pa defs/ 547tree definition files for use with 548.Xr gensnmptree 1 549.It Pa mibs/ 550MIB files 551.El 552.It Pa syscons/ 553files used by syscons; 554see 555.Xr syscons 4 556.Bl -tag -width "scrnmaps/" -compact 557.It Pa fonts/ 558console fonts; 559see 560.Xr vidcontrol 1 561and 562.Xr vidfont 1 563.It Pa keymaps/ 564console keyboard maps; 565see 566.Xr kbdcontrol 1 567and 568.Xr kbdmap 1 569.It Pa scrnmaps/ 570console screen maps 571.El 572.It Pa tabset/ 573tab description files for a variety of terminals; used in 574the termcap file; 575see 576.Xr termcap 5 577.It Pa vi/ 578localization support and utilities for 579.Xr vi 1 580.It Pa vt/ 581files used by vt; 582see 583.Xr vt 4 584.Bl -tag -width "scrnmaps/" -compact 585.It Pa fonts/ 586console fonts; 587see 588.Xr vidcontrol 1 589and 590.Xr vidfont 1 591.It Pa keymaps/ 592console keyboard maps; 593see 594.Xr kbdcontrol 1 595and 596.Xr kbdmap 1 597.\" .It Pa scrnmaps/ 598.\" console screen maps 599.El 600.It Pa zoneinfo/ 601timezone configuration information; 602see 603.Xr tzfile 5 604.El 605.It Pa src/ 606.Bx , 607third-party, and/or local source files 608.Pp 609.Bl -tag -width "kerberos5/" -compact 610.It Pa bin/ 611source code for files in /bin 612.It Pa cddl/ 613utilities covered by the Common Development and Distribution License 614.It Pa contrib/ 615source code for contributed software 616.It Pa crypto/ 617source code for contributed cryptography software 618.It Pa etc/ 619source code for files in 620.Pa /etc 621.It Pa gnu/ 622utilities covered by the GNU General Public License 623.It Pa include/ 624source code for files in 625.Pa /usr/include 626.It Pa kerberos5/ 627build infrastructure for kerberos version 5 628.It Pa lib/ 629source code for files in 630.Pa /lib 631and 632.Pa /usr/lib 633.It Pa libexec/ 634source code for files in 635.Pa /usr/libexec 636.It Pa release/ 637files required to produce a 638.Fx 639release 640.It Pa rescue/ 641source code for files in 642.Pa /rescue 643.It Pa sbin/ 644source code for files in 645.Pa /sbin 646.It Pa secure/ 647build directory for files in 648.Pa /usr/src/crypto 649.It Pa share/ 650source for files in 651.Pa /usr/share 652.It Pa stand/ 653boot loader source code 654.It Pa sys/ 655kernel source code 656.Bl -tag -width "opencrypto/" -compact 657.It Pa amd64/ 658AMD64 architecture support 659.It Pa arm/ 660ARM architecture support 661.It Pa arm64/ 662ARMv8 architecture support 663.It Pa cam/ 664.Xr cam 4 665and 666.Xr ctl 4 667.It Pa cddl/ 668CDDL-licensed optional sources, including ZFS 669and DTrace 670.It Pa ddb/ 671.Xr ddb 4 672.It Pa fs/ 673most filesystems 674.It Pa dev/ 675device drivers 676.It Pa geom/ 677.Xr geom 4 678.It Pa i386/ 679i386 (32 bit) architecture support 680.It Pa kern/ 681main part of the kernel 682.It Pa mips/ 683MIPS architecture support 684.It Pa net80211/ 685.Xr net80211 4 686.It Pa netgraph/ 687.Xr netgraph 4 688.It Pa netinet/ 689.Xr inet 4 690.It Pa netinet6/ 691.Xr inet6 4 692.It Pa netipsec/ 693.Xr ipsec 4 694.It Pa netpfil/ 695.Xr ipfw 4 696and 697.Xr pf 4 698.It Pa opencrypto/ 699.Xr crypto 7 700.It Pa powerpc/ 701PowerPC/POWER architecture support 702.It Pa riscv/ 703RISC-V architecture support 704.It Pa security/ 705.Xr audit 4 706and 707.Xr mac 4 708.It Pa sparc64/ 709SPARC64 architecture support 710.It Pa sys/ 711kernel headers 712.It Pa ufs/ 713Unix File System 714.It Pa x86/ 715code shared by AMD64 and i386 architectures 716.El 717.It Pa targets/ 718support for experimental DIRDEPS_BUILD 719.It Pa tests/ 720source code for files in 721.Pa /usr/tests 722.It Pa tools/ 723tools used for maintenance and testing of 724.Fx 725.It Pa usr.bin/ 726source code for files in 727.Pa /usr/bin 728.It Pa usr.sbin/ 729source code for files in 730.Pa /usr/sbin 731.El 732.Pp 733.It Pa tests/ 734The 735.Fx 736test suite. 737See 738.Xr tests 7 739for more details. 740.El 741.It Pa /var/ 742multi-purpose log, temporary, transient, and spool files 743.Pp 744.Bl -tag -width "preserve/" -compact 745.It Pa account/ 746system accounting files 747.Pp 748.Bl -tag -width Fl -compact 749.It Pa acct 750execution accounting file; 751see 752.Xr acct 5 753.El 754.Pp 755.It Pa at/ 756timed command scheduling files; 757see 758.Xr \&at 1 759.Bl -tag -width "preserve/" -compact 760.It Pa jobs/ 761directory containing job files 762.It Pa spool/ 763directory containing output spool files 764.El 765.Pp 766.It Pa backups/ 767miscellaneous backup files 768.It Pa cache/ 769miscellaneous cached files 770.Bl -tag -width "pkg/" -compact 771.It Pa pkg/ 772cached packages for 773.Xr pkg 8 774.El 775.Pp 776.It Pa crash/ 777default directory to store kernel crash dumps; see 778.Xr crash 8 779and 780.Xr savecore 8 781.It Pa cron/ 782files used by cron; 783see 784.Xr cron 8 785.Bl -tag -width "preserve/" -compact 786.It Pa tabs/ 787crontab files; 788see 789.Xr crontab 5 790.El 791.Pp 792.It Pa db/ 793miscellaneous automatically generated system-specific database files 794.It Pa empty/ 795empty directory for use by programs that need a specifically empty directory. 796Used for instance by 797.Xr sshd 8 798for privilege separation. 799.It Pa games/ 800miscellaneous game status and score files 801.It Pa heimdal/ 802kerberos server databases; see 803.Xr kdc 8 804.It Pa log/ 805miscellaneous system log files 806.Pp 807.Bl -tag -width Fl -compact 808.It Pa utx.lastlogin 809last login log; 810see 811.Xr getutxent 3 812.It Pa utx.log 813login/logout log; 814see 815.Xr getutxent 3 816.El 817.Pp 818.It Pa mail/ 819user mailbox files 820.It Pa msgs/ 821system messages database; 822see 823.Xr msgs 1 824.It Pa preserve/ 825temporary home of files preserved after an accidental death 826of an editor; 827see 828.Xr \&ex 1 829.It Pa quotas/ 830file system quota information files 831.It Pa run/ 832system information files describing various info about 833system since it was booted 834.Pp 835.Bl -tag -width Fl -compact 836.It Pa ppp/ 837writable by the 838.Dq network 839group for command connection sockets; see 840.Xr ppp 8 841.It Pa utx.active 842database of current users; 843see 844.Xr getutxent 3 845.El 846.Pp 847.It Pa rwho/ 848rwho data files; 849see 850.Xr rwhod 8 , 851.Xr rwho 1 , 852and 853.Xr ruptime 1 854.It Pa spool/ 855miscellaneous printer and mail system spooling directories 856.Pp 857.Bl -tag -width Fl -compact 858.It Pa clientmqueue/ 859undelivered submission mail queue; 860see 861.Xr sendmail 8 862.It Pa ftp/ 863commonly ~ftp; the anonymous ftp root directory 864.It Pa mqueue/ 865undelivered mail queue; 866see 867.Xr sendmail 8 868.It Pa output/ 869line printer spooling directories 870.El 871.Pp 872.It Pa tmp/ 873temporary files that are kept between system reboots 874.Bl -tag -width Fl -compact 875.It Pa vi.recover/ 876the directory where recovery files are stored 877.El 878.It Pa yp/ 879the NIS maps 880.El 881.El 882.Sh NOTES 883This manual page documents the default 884.Fx 885file system layout, but 886the actual hierarchy on a given system is defined at the system 887administrator's discretion. 888A well-maintained installation will include a customized version of 889this document. 890.Sh SEE ALSO 891.Xr apropos 1 , 892.Xr find 1 , 893.Xr finger 1 , 894.Xr grep 1 , 895.Xr ls 1 , 896.Xr whatis 1 , 897.Xr whereis 1 , 898.Xr which 1 , 899.Xr fd 4 , 900.Xr devfs 5 , 901.Xr fsck 8 902.Sh HISTORY 903A 904.Nm 905manual page appeared in 906.At v7 . 907