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: src/share/man/man7/hier.7,v 1.29.2.17 2003/01/13 21:43:50 ceri Exp $ 30.\" 31.Dd May 22, 2020 32.Dt HIER 7 33.Os 34.Sh NAME 35.Nm hier 36.Nd layout of filesystems 37.Sh DESCRIPTION 38A sketch of the filesystem hierarchy. 39.Bl -tag -width ".Pa /modules/" 40.It Pa / 41root directory of the filesystem 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 ".Pa modules.local/" -compact 48.It Pa defaults/ 49default bootstrapping configuration files; see 50.Xr loader.conf 5 51.It Pa kernel/ 52pure kernel executable (the operating system loaded into memory 53at boot time) and loadable kernel modules; 54see 55.Xr kldstat 8 56.It Pa modules.local/ 57local loadable kernel modules and wrapped external firmware images; see 58.Xr firmware 9 59.El 60.It Pa /compat/ 61files related to compatibility layers 62.Pp 63.Bl -tag -width ".Pa ndis/" -compact 64.It Pa ndis/ 65firmware for 66.Xr ndis 4 67drivers 68.El 69.It Pa /dev/ 70block and character device files 71.Pp 72.Bl -tag -width ".Pa fd/" -compact 73.It Pa fd/ 74file descriptor files; 75see 76.Xr fd 4 77.El 78.It Pa /etc/ 79system configuration files and scripts 80.Pp 81.Bl -tag -width ".Pa bluetooth/" -compact 82.It Pa autofs/ 83shell scripts to implement special maps and directory services via 84.Xr autofs 5 85.It Pa bluetooth/ 86bluetooth configuration files 87.It Pa defaults/ 88default system configuration files; 89see 90.Xr rc 8 91.It Pa devd/ 92hardware specific 93.Xr devd 8 94configuration files 95.It Pa dma/ 96.Xr dma 8 97configuration files 98.It Pa localtime 99local timezone information; 100see 101.Xr ctime 3 102.It Pa mail/ 103Sendmail control files 104.It Pa mtree/ 105mtree configuration files; 106see 107.Xr mtree 8 108.It Pa pam.d/ 109configuration files for the Pluggable Authentication Modules (PAM) 110library 111.It Pa periodic/ 112scripts that are run daily, weekly, and monthly, via 113.Xr cron 8 ; 114see 115.Xr periodic 8 116.It Pa ppp/ 117ppp configuration files; 118see 119.Xr ppp 8 120.It Pa rc.d/ 121System and daemon startup/control scripts; 122see 123.Xr rc 8 124.It Pa ssh/ 125OpenSSH configuration files; 126see 127.Xr ssh 1 128.It Pa ssl/ 129LibreSSL configuration files 130.It Pa upgrade/ 131Files relevant to system upgrades 132.El 133.It Pa /home/ 134HOME directories of non-root users 135.It Pa /lib/ 136critical system libraries needed for binaries in 137.Pa /bin 138and 139.Pa /sbin 140.It Pa /libexec/ 141critical system utilities needed for binaries in 142.Pa /bin 143and 144.Pa /sbin 145.It Pa /mnt/ 146empty directory commonly used by 147system administrators as a temporary mount point 148.It Pa /net/ 149automounted NFS shares; 150see 151.Xr auto_master 5 152.It Pa /pfs/ 153pseudo file system directory (on 154.Xr hammer 5 155root file systems) 156.It Pa /proc/ 157process file system; 158see 159.Xr procfs 5 , 160.Xr mount_procfs 8 161.It Pa /rescue/ 162statically linked rescue tools, see 163.Xr initrd 7 164.It Pa /root/ 165root's HOME directory 166.It Pa /sbin/ 167system programs and administration utilities 168fundamental to both single-user and multi-user environments 169.It Pa /sys/ 170the kernel's source code (usually a symbolic link to 171.Pa /usr/src/sys ) 172.It Pa /tmp/ 173temporary files that are not guaranteed to persist across system reboots 174.It Pa /usr/ 175contains the majority of user utilities and applications 176.Pp 177.Bl -tag -width ".Pa libdata/" -compact 178.It Pa bin/ 179common utilities, programming tools, and applications 180.It Pa dports/ 181The 182.Dx 183.Xr dports 7 184collection (optional). 185.It Pa games/ 186useful and semi-frivolous programs 187.It Pa include/ 188standard C include files 189.Pp 190.Bl -tag -width ".Pa protocols/" -compact 191.It Pa arpa/ 192C include files for Internet service protocols 193.It Pa bus/ 194C include files for programming various 195.Dx 196buses 197.It Pa c++/ 198C++ include files 199.It Pa compat/ 200C include files for compatibility with code ported from other 201operating systems 202.It Pa dev/ 203C include files for programming various 204.Dx 205devices 206.It Pa libprop/ 207C include files for libprop 208.It Pa machine/ 209machine-specific C include files 210.It Pa net/ 211misc network C include files 212.It Pa netinet/ 213C include files for Internet standard protocols; 214see 215.Xr inet 4 216.It Pa netinet6/ 217C include files for Internet protocol version 6; 218see 219.Xr inet6 4 220.It Pa netsmb/ 221SMB/CIFS requester 222.It Pa pcap/ 223Packet Capture (libpcap) headers; 224see 225.Xr pcap 3 226.It Pa protocols/ 227C include files for Berkeley service protocols 228.It Pa readline/ 229get a line from a user, with editing; 230see 231.Xr readline 3 232.It Pa rpc/ 233remote procedure calls; 234see 235.Xr rpc 3 236.It Pa rpcsvc/ 237definition of RPC service structures; see 238.Xr rpc 3 239.It Pa security/ 240PAM; see 241.Xr pam 3 242.It Pa sys/ 243system C include files (kernel data structures) 244.It Pa vfs/ 245C include files for various file systems 246.It Pa vm/ 247virtual memory; 248see 249.Xr vmstat 8 250.El 251.Pp 252.It Pa lib/ 253archive libraries 254.It Pa libdata/ 255misc. utility data files 256.It Pa libexec/ 257system daemons & system utilities (executed by other programs) 258.Pp 259.Bl -tag -width ".Pa binutils234/" -compact 260.It Pa binutils227/ 261.Pp 262.Bl -tag -width ".Pa bfd-plugins/" -compact 263.It Pa bfd-plugins/ 264linker plugins 265.It Pa ldscripts/ 266linker scripts; 267see 268.Xr ld 1 269.El 270.Pp 271.It Pa binutils234/ 272.Pp 273.Bl -tag -width ".Pa bfd-plugins/" -compact 274.It Pa bfd-plugins/ 275linker plugins 276.It Pa ldscripts/ 277linker scripts; 278see 279.Xr ld 1 280.El 281.Pp 282.It Pa lpr/ 283utilities and filters for LP print system; 284see 285.Xr lpr 1 286.El 287.Pp 288.It Pa local/ 289local executables, libraries, etc. 290Also used as the default destination for the 291.Dx 292.Xr dports 7 293framework. 294Within 295.Pa local/ , 296the general layout sketched out by 297.Nm 298for 299.Pa /usr 300should be used. 301Exceptions are the 302.Pa man 303directory 304.Po directly under 305.Pa local/ 306rather than under 307.Pa local/share/ Ns Pc , 308ports documentation 309.Po in 310.Pa share/doc/<port>/ Ns Pc , 311and 312.Pa /usr/local/etc 313.Po mimics 314.Pa /etc Ns Pc . 315.It Pa obj/ 316architecture-specific target tree produced by building the 317.Pa /usr/src 318tree 319.It Pa sbin/ 320system daemons & system utilities (executed by users) 321.It Pa share/ 322architecture-independent files 323.Pp 324.Bl -tag -width ".Pa installer/" -compact 325.It Pa calendar/ 326a variety of pre-fab calendar files; 327see 328.Xr calendar 1 329.It Pa dict/ 330word lists; 331see 332.Xr look 1 333.Pp 334.Bl -tag -width ".Pa papers/" -compact 335.It Pa web2 336words from Webster's 2nd International 337.It Pa words 338common words 339.It Pa papers/ 340reference databases; 341see 342.Xr refer 1 343.El 344.Pp 345.It Pa doc/ 346miscellaneous documentation 347.Pp 348.Bl -tag -width ".Pa legal/" -compact 349.It Pa legal/ 350License files for vendor supplied firmware 351.El 352.Pp 353.It Pa dsynth/ 354.Xr dsynth 1 355scripts 356.It Pa examples/ 357various examples for users and programmers 358.It Pa games/ 359ASCII text files used by various games 360.It Pa i18n/ 361internationalization databases; see 362.Xr iconv 3 363.It Pa info/ 364GNU Info hypertext system 365.It Pa libg++/ 366libg++'s genclass prototype/template class files 367.It Pa locale/ 368localization files; 369see 370.Xr setlocale 3 371.It Pa man/ 372manual pages 373.It Pa misc/ 374misc system-wide ASCII text files 375.Pp 376.Bl -tag -width ".Pa termcap" -compact 377.It Pa termcap 378terminal characteristics database; 379see 380.Xr termcap 5 381.El 382.Pp 383.It Pa mk/ 384templates for make; 385see 386.Xr make 1 387.It Pa nls/ 388national language support files; 389see 390.Xr nls 7 391.It Pa sendmail/ 392sendmail configuration files; 393see 394.Xr sendmail 8 395.It Pa skel/ 396example . (dot) files for new accounts 397.It Pa syscons/ 398files used by 399.Xr syscons 4 400.Pp 401.Bl -tag -width ".Pa scrnmaps/" -compact 402.It Pa fonts/ 403console fonts; 404see 405.Xr vidcontrol 1 406and 407.Xr vidfont 1 408.It Pa keymaps/ 409console keyboard maps; 410see 411.Xr kbdcontrol 1 412and 413.Xr kbdmap 1 414.It Pa scrnmaps/ 415console screen maps 416.El 417.Pp 418.It Pa tabset/ 419tab description files for a variety of terminals; used in 420the termcap file; 421see 422.Xr termcap 5 423.It Pa terminfo/ 424compiled 425.Xr terminfo 5 426database files 427.It Pa vi/ 428localization support and utilities for 429.Xr vi 1 430.It Pa zoneinfo/ 431timezone configuration information; 432see 433.Xr tzfile 5 434.El 435.Pp 436.It Pa src/ 437.Bx , 438third-party, and/or local source files 439.Pp 440.Bl -tag -width ".Pa nrelease/" -compact 441.It Pa bin/ 442source code for files in 443.Pa /bin 444.It Pa contrib/ 445source code for contributed software 446.It Pa crypto/ 447source code for contributed cryptography software 448.It Pa etc/ 449source code for files in 450.Pa /etc 451.It Pa games/ 452source code for files in 453.Pa /usr/games 454.It Pa gnu/ 455Utilities covered by the GNU General Public License 456.It Pa include/ 457source code for files in 458.Pa /usr/include 459.It Pa lib/ 460source code for files in 461.Pa /usr/lib 462.It Pa libexec/ 463source code for files in 464.Pa /usr/libexec 465.It Pa nrelease/ 466files required to produce a 467.Dx 468release 469.It Pa sbin/ 470source code for files in 471.Pa /sbin 472.It Pa share/ 473source for files in 474.Pa /usr/share 475.It Pa sys/ 476kernel source code 477.It Pa tools/ 478tools used for maintenance and testing of 479.Dx 480.It Pa usr.bin/ 481source code for files in 482.Pa /usr/bin 483.It Pa usr.sbin/ 484source code for files in 485.Pa /usr/sbin 486.El 487.El 488.It Pa /var/ 489multi-purpose log, temporary, transient, and spool files 490.Pp 491.Bl -tag -width ".Pa preserve/" -compact 492.It Pa account/ 493system accounting files 494.Pp 495.Bl -tag -width ".Pa acct" -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 ".Pa spool/" -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/ 515misc. backup files 516.It Pa chroot/ 517home directories of applications which are run in a 518.Xr chroot 8 519.Dq cage 520.It Pa crash/ 521default directory to store kernel crash dumps; see 522.Xr crash 8 523and 524.Xr savecore 8 525.It Pa cron/ 526files used by cron; 527see 528.Xr cron 8 529.Pp 530.Bl -tag -width ".Pa tabs/" -compact 531.It Pa tabs/ 532crontab files; 533see 534.Xr crontab 5 535.El 536.Pp 537.It Pa db/ 538misc. automatically generated system-specific database files 539.It Pa empty/ 540empty directory used by 541.Xr sshd 8 542for privilege separation 543.It Pa games/ 544misc. game status and score files 545.It Pa hammer/ 546per PFS (pseudo file system) snapshots directory for 547.Xr hammer 5 548file systems 549.It Pa log/ 550misc. system log files 551.Pp 552.Bl -tag -width ".Pa wtmpx" -compact 553.It Pa wtmpx 554login/logout log; 555see 556.Xr wtmpx 5 557.El 558.Pp 559.It Pa mail/ 560user mailbox files 561.It Pa msgs/ 562system messages database; 563see 564.Xr msgs 1 565.It Pa preserve/ 566temporary home of files preserved after an accidental death 567of an editor; 568see 569.Xr ex 1 570.It Pa quotas/ 571filesystem quota information files 572.It Pa run/ 573system information files describing various info about 574system since it was booted 575.Pp 576.Bl -tag -width ".Pa resolvconf/" -compact 577.It Pa dhcpcd/ 578for storing files by 579.Xr dhcpcd 8 580hooks 581.It Pa ppp/ 582writable by the 583.Dq network 584group for command connection sockets; see 585.Xr ppp 8 586.It Pa resolvconf/ 587state directory for 588.Xr resolvconf 8 589.It Pa utmpx 590database of current users; 591see 592.Xr utmpx 5 593.It Pa sem/ 594rendez-vous files for POSIX named semaphores; 595see 596.Xr sem_open 3 597.It Pa shm/ 598files associated with POSIX shared memory objects; 599see 600.Xr shm_open 3 601.El 602.Pp 603.It Pa rwho/ 604rwho data files; 605see 606.Xr rwhod 8 , 607.Xr rwho 1 , 608and 609.Xr ruptime 1 610.It Pa spool/ 611misc. printer and mail system spooling directories 612.Pp 613.Bl -tag -width ".Pa clientmqueue/" -compact 614.It Pa clientmqueue/ 615undelivered submission mail queue; 616see 617.Xr sendmail 8 618.It Pa dma/ 619undelivered mail queue; 620see 621.Xr dma 8 622.It Pa ftp/ 623commonly 624.Pa ~ftp ; 625the anonymous ftp root directory 626.It Pa mqueue/ 627undelivered mail queue; 628see 629.Xr sendmail 8 630.It Pa output/ 631line printer spooling directories 632.El 633.Pp 634.It Pa tmp/ 635temporary files that are kept between system reboots 636.Pp 637.Bl -tag -width ".Pa vi.recover/" -compact 638.It Pa vi.recover/ 639the directory where recovery files are stored 640.El 641.Pp 642.It Pa yp/ 643the NIS maps 644.El 645.El 646.Sh NOTES 647This manual page documents the default 648.Dx 649filesystem 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 finger 1 , 658.Xr grep 1 , 659.Xr ls 1 , 660.Xr whatis 1 , 661.Xr whereis 1 , 662.Xr which 1 , 663.Xr fsck 8 664.Sh HISTORY 665A 666.Nm 667manual page appeared in 668.At v7 . 669