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 June 4, 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 crash/ 517default directory to store kernel crash dumps; see 518.Xr crash 8 519and 520.Xr savecore 8 521.It Pa cron/ 522files used by cron; 523see 524.Xr cron 8 525.Pp 526.Bl -tag -width ".Pa tabs/" -compact 527.It Pa tabs/ 528crontab files; 529see 530.Xr crontab 5 531.El 532.Pp 533.It Pa db/ 534misc. automatically generated system-specific database files 535.It Pa empty/ 536empty directory used by 537.Xr sshd 8 538for privilege separation 539.It Pa games/ 540misc. game status and score files 541.It Pa hammer/ 542per PFS (pseudo file system) snapshots directory for 543.Xr hammer 5 544file systems 545.It Pa log/ 546misc. system log files 547.Pp 548.Bl -tag -width ".Pa wtmpx" -compact 549.It Pa wtmpx 550login/logout log; 551see 552.Xr wtmpx 5 553.El 554.Pp 555.It Pa mail/ 556user mailbox files 557.It Pa msgs/ 558system messages database; 559see 560.Xr msgs 1 561.It Pa preserve/ 562temporary home of files preserved after an accidental death 563of an editor; 564see 565.Xr ex 1 566.It Pa quotas/ 567filesystem quota information files 568.It Pa run/ 569system information files describing various info about 570system since it was booted 571.Pp 572.Bl -tag -width ".Pa resolvconf/" -compact 573.It Pa dhcpcd/ 574for storing files by 575.Xr dhcpcd 8 576hooks 577.It Pa ppp/ 578writable by the 579.Dq network 580group for command connection sockets; see 581.Xr ppp 8 582.It Pa resolvconf/ 583state directory for 584.Xr resolvconf 8 585.It Pa utmpx 586database of current users; 587see 588.Xr utmpx 5 589.It Pa sem/ 590rendez-vous files for POSIX named semaphores; 591see 592.Xr sem_open 3 593.It Pa shm/ 594files associated with POSIX shared memory objects; 595see 596.Xr shm_open 3 597.El 598.Pp 599.It Pa rwho/ 600rwho data files; 601see 602.Xr rwhod 8 , 603.Xr rwho 1 , 604and 605.Xr ruptime 1 606.It Pa spool/ 607misc. printer and mail system spooling directories 608.Pp 609.Bl -tag -width ".Pa clientmqueue/" -compact 610.It Pa clientmqueue/ 611undelivered submission mail queue; 612see 613.Xr sendmail 8 614.It Pa dma/ 615undelivered mail queue; 616see 617.Xr dma 8 618.It Pa ftp/ 619commonly 620.Pa ~ftp ; 621the anonymous ftp root directory 622.It Pa mqueue/ 623undelivered mail queue; 624see 625.Xr sendmail 8 626.It Pa output/ 627line printer spooling directories 628.El 629.Pp 630.It Pa tmp/ 631temporary files that are kept between system reboots 632.Pp 633.Bl -tag -width ".Pa vi.recover/" -compact 634.It Pa vi.recover/ 635the directory where recovery files are stored 636.El 637.Pp 638.It Pa yp/ 639the NIS maps 640.El 641.El 642.Sh NOTES 643This manual page documents the default 644.Dx 645filesystem 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 finger 1 , 654.Xr grep 1 , 655.Xr ls 1 , 656.Xr whatis 1 , 657.Xr whereis 1 , 658.Xr which 1 , 659.Xr fsck 8 660.Sh HISTORY 661A 662.Nm 663manual page appeared in 664.At v7 . 665