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 February 19, 2023 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 stand/ 471source code for files in 472.Pa /boot 473.It Pa sys/ 474kernel source code 475.It Pa tools/ 476tools used for maintenance and testing of 477.Dx 478.It Pa usr.bin/ 479source code for files in 480.Pa /usr/bin 481.It Pa usr.sbin/ 482source code for files in 483.Pa /usr/sbin 484.El 485.El 486.It Pa /var/ 487multi-purpose log, temporary, transient, and spool files 488.Pp 489.Bl -tag -width ".Pa preserve/" -compact 490.It Pa account/ 491system accounting files 492.Pp 493.Bl -tag -width ".Pa acct" -compact 494.It Pa acct 495execution accounting file; 496see 497.Xr acct 5 498.El 499.Pp 500.It Pa at/ 501timed command scheduling files; 502see 503.Xr at 1 504.Pp 505.Bl -tag -width ".Pa spool/" -compact 506.It Pa jobs/ 507directory containing job files 508.It Pa spool/ 509directory containing output spool files 510.El 511.Pp 512.It Pa backups/ 513misc. backup files 514.It Pa crash/ 515default directory to store kernel crash dumps; see 516.Xr crash 8 517and 518.Xr savecore 8 519.It Pa cron/ 520files used by cron; 521see 522.Xr cron 8 523.Pp 524.Bl -tag -width ".Pa tabs/" -compact 525.It Pa tabs/ 526crontab files; 527see 528.Xr crontab 5 529.El 530.Pp 531.It Pa db/ 532misc. automatically generated system-specific database files 533.It Pa empty/ 534empty directory used by 535.Xr sshd 8 536for privilege separation 537.It Pa games/ 538misc. game status and score files 539.It Pa hammer/ 540per PFS (pseudo file system) snapshots directory for 541.Xr hammer 5 542file systems 543.It Pa log/ 544misc. system log files 545.Pp 546.Bl -tag -width ".Pa wtmpx" -compact 547.It Pa wtmpx 548login/logout log; 549see 550.Xr wtmpx 5 551.El 552.Pp 553.It Pa mail/ 554user mailbox files 555.It Pa msgs/ 556system messages database; 557see 558.Xr msgs 1 559.It Pa preserve/ 560temporary home of files preserved after an accidental death 561of an editor; 562see 563.Xr ex 1 564.It Pa quotas/ 565filesystem quota information files 566.It Pa run/ 567system information files describing various info about 568system since it was booted 569.Pp 570.Bl -tag -width ".Pa resolvconf/" -compact 571.It Pa dhcpcd/ 572for storing files by 573.Xr dhcpcd 8 574hooks 575.It Pa ppp/ 576writable by the 577.Dq network 578group for command connection sockets; see 579.Xr ppp 8 580.It Pa resolvconf/ 581state directory for 582.Xr resolvconf 8 583.It Pa utmpx 584database of current users; 585see 586.Xr utmpx 5 587.It Pa sem/ 588rendez-vous files for POSIX named semaphores; 589see 590.Xr sem_open 3 591.It Pa shm/ 592files associated with POSIX shared memory objects; 593see 594.Xr shm_open 3 595.El 596.Pp 597.It Pa rwho/ 598rwho data files; 599see 600.Xr rwhod 8 , 601.Xr rwho 1 , 602and 603.Xr ruptime 1 604.It Pa spool/ 605misc. printer and mail system spooling directories 606.Pp 607.Bl -tag -width ".Pa mqueue/" -compact 608.It Pa dma/ 609undelivered mail queue; 610see 611.Xr dma 8 612.It Pa ftp/ 613commonly 614.Pa ~ftp ; 615the anonymous ftp root directory 616.It Pa mqueue/ 617undelivered mail queue; 618see 619.Xr sendmail 8 620.It Pa output/ 621line printer spooling directories 622.El 623.Pp 624.It Pa tmp/ 625temporary files that are kept between system reboots 626.Pp 627.Bl -tag -width ".Pa vi.recover/" -compact 628.It Pa vi.recover/ 629the directory where recovery files are stored 630.El 631.Pp 632.It Pa yp/ 633the NIS maps 634.El 635.El 636.Sh NOTES 637This manual page documents the default 638.Dx 639filesystem layout, but 640the actual hierarchy on a given system is defined at the system 641administrator's discretion. 642A well-maintained installation will include a customized version of 643this document. 644.Sh SEE ALSO 645.Xr apropos 1 , 646.Xr find 1 , 647.Xr finger 1 , 648.Xr grep 1 , 649.Xr ls 1 , 650.Xr whatis 1 , 651.Xr whereis 1 , 652.Xr which 1 , 653.Xr fsck 8 654.Sh HISTORY 655A 656.Nm 657manual page appeared in 658.At v7 . 659