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