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. All advertising materials mentioning features or use of this software 13.\" must display the following acknowledgement: 14.\" This product includes software developed by the University of 15.\" California, Berkeley and its contributors. 16.\" 4. Neither the name of the University nor the names of its contributors 17.\" may be used to endorse or promote products derived from this software 18.\" without specific prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)hier.7 8.1 (Berkeley) 6/5/93 33.\" $FreeBSD$ 34.\" 35.Dd January 21, 2010 36.Dt HIER 7 37.Os 38.Sh NAME 39.Nm hier 40.Nd layout of file systems 41.Sh DESCRIPTION 42A sketch of the file system hierarchy. 43.Bl -tag -width ".Pa /libexec/" 44.It Pa / 45root directory of the file system 46.It Pa /bin/ 47user utilities fundamental to both single-user and multi-user environments 48.It Pa /boot/ 49programs and configuration files used during operating system bootstrap 50.Pp 51.Bl -tag -width ".Pa defaults/" -compact 52.It Pa defaults/ 53default bootstrapping configuration files; see 54.Xr loader.conf 5 55.It Pa kernel/ 56pure kernel executable (the operating system loaded into memory 57at boot time). 58.It Pa modules/ 59third-party loadable kernel modules; 60see 61.Xr kldstat 8 62.El 63.It Pa /cdrom/ 64default mount point for CD-ROM drives 65.It Pa /compat/ 66normally a link to 67.Pa /usr/compat . 68If not, then the 69.Pa /usr/compat 70comments apply 71.It Pa /dev/ 72device special files managed by 73.Xr devfs 5 74.Pp 75.Bl -tag -width ".Pa net/" -compact 76.It Pa fd/ 77file descriptor files; 78see 79.Xr \&fd 4 80.It Pa net/ 81network devices 82.El 83.It Pa /etc/ 84system configuration files and scripts 85.Pp 86.Bl -tag -width ".Pa bluetooth/" -compact 87.It Pa defaults/ 88default system configuration files; 89see 90.Xr rc 8 91.It Pa bluetooth/ 92bluetooth configuration files 93.It Pa gnats/ 94gnats configuration files; 95see 96.Xr send-pr 1 97.It Pa localtime 98local timezone information; 99see 100.Xr ctime 3 101.It Pa mail/ 102Sendmail control files 103.It Pa mtree/ 104mtree configuration files; 105see 106.Xr mtree 8 107.It Pa namedb/ 108named configuration files; 109see 110.Xr named 8 111.It Pa pam.d/ 112configuration files for the Pluggable Authentication Modules (PAM) 113library 114.It Pa periodic/ 115scripts that are run daily, weekly, and monthly, via 116.Xr cron 8 ; 117see 118.Xr periodic 8 119.It Pa rc.d/ 120System and daemon startup/control scripts; 121see 122.Xr rc 8 123.It Pa security/ 124OpenBSM audit configuration files; 125see 126.Xr audit 8 127.It Pa ppp/ 128ppp configuration files; 129see 130.Xr ppp 8 131.It Pa ssh/ 132OpenSSH configuration files; 133see 134.Xr ssh 1 135.It Pa ssl/ 136OpenSSL configuration files 137.El 138.It Pa /lib/ 139critical system libraries needed for binaries in 140.Pa /bin 141and 142.Pa /sbin 143.Pp 144.Bl -tag -width ".Pa geom/" -compact 145.It Pa geom/ 146class-specific libraries for the 147.Xr geom 8 148utility 149.El 150.It Pa /libexec/ 151critical system utilities needed for binaries in 152.Pa /bin 153and 154.Pa /sbin 155.It Pa /media/ 156contains subdirectories to be used as mount points 157for removable media such as CDs, USB drives, and 158floppy disks 159.It Pa /mnt/ 160empty directory commonly used by 161system administrators as a temporary mount point 162.It Pa /proc/ 163process file system; 164see 165.Xr procfs 5 166.It Pa /rescue/ 167statically linked programs for emergency recovery; 168see 169.Xr rescue 8 170.It Pa /root/ 171root's HOME directory 172.It Pa /sbin/ 173system programs and administration utilities 174fundamental to both single-user and multi-user environments 175.It Pa /tmp/ 176temporary files that are not guaranteed to persist across system reboots 177.It Pa /usr/ 178contains the majority of user utilities and applications 179.Pp 180.Bl -tag -width ".Pa libdata/" -compact 181.It Pa bin/ 182common utilities, programming tools, and applications 183.It Pa compat/ 184files needed to support binary compatibility with other operating systems, 185such as Linux 186.It Pa games/ 187useful and semi-frivolous programs 188.It Pa include/ 189standard C include files 190.Pp 191.Bl -tag -width ".Pa kerberos5/" -compact 192.It Pa altq/ 193C include files for alternate queueing 194.It Pa arpa/ 195C include files for Internet service protocols 196.It Pa bsnmp/ 197C include files for the SNMP daemon 198.It Pa c++/ 199C++ include files 200.It Pa cam/ 201C include files for the Common Access Methods Layer 202.Bl -tag -width ".Pa kerberos5/" -compact 203.It Pa scsi/ 204The SCSI device on top of CAM 205.El 206.It Pa dev/ 207C include files for programming various 208.Fx 209devices 210.Bl -tag -width ".Pa kerberos5/" -compact 211.It Pa ic/ 212Various header files describing driver- and bus-independent 213hardware circuits 214.It Pa ofw/ 215Open Firmware support 216.It Pa pbio/ 2178255 PPI cards; 218see 219.Xr pbio 4 220.It Pa ppbus/ 221The parallel port bus; 222see 223.Xr ppbus 4 224.It Pa usb/ 225The USB subsystem 226.It Pa utopia/ 227Physical chip driver for ATM interfaces; 228see 229.Xr utopia 4 230.It Pa wi/ 231The 232.Xr wi 4 233WaveLAN driver 234.El 235.It Pa fs/ 236.Bl -tag -width ".Pa kerberos5/" -compact 237.It Pa fdescfs/ 238per-process file descriptors file system 239.It Pa fifofs/ 240.St -p1003.1 241FIFOs file system 242.It Pa msdosfs/ 243MS-DOS file system 244.It Pa nfs/ 245C include files for NFS (Network File System) version 2, 3 and 4 246.It Pa nullfs/ 247loopback file system 248.It Pa procfs/ 249process file system 250.It Pa smbfs/ 251SMB/CIFS file system 252.It Pa udf/ 253UDF file system 254.It Pa unionfs 255union file system 256.El 257.It Pa geom/ 258GEOM framework 259.Bl -tag -width ".Pa kerberos5/" -compact 260.It Pa concat/ 261CONCAT GEOM class 262.It Pa gate/ 263GATE GEOM class 264.It Pa mirror/ 265MIRROR GEOM class 266.It Pa nop/ 267NOP GEOM class 268.It Pa raid3/ 269RAID3 GEOM class 270.It Pa stripe/ 271STRIPE GEOM class 272.El 273.Pp 274.It Pa isc/ 275ISC utility library libisc include files 276.It Pa isofs/ 277.Bl -tag -width ".Pa kerberos5/" -compact 278.It Pa cd9660/ 279iso9660 file system 280.El 281.It Pa libmilter/ 282C include files for libmilter, 283the 284.Xr sendmail 8 285mail filter API 286.It Pa machine/ 287machine-specific C include files 288.It Pa net/ 289miscellaneous network C include files 290.It Pa netatalk/ 291Appletalk protocol 292.It Pa netinet/ 293C include files for Internet standard protocols; 294see 295.Xr inet 4 296.It Pa netinet6/ 297C include files for Internet protocol version 6; 298see 299.Xr inet6 4 300.It Pa netipsec/ 301kernel key-management service; 302see 303.Xr ipsec 4 304.It Pa netipx/ 305IPX/SPX protocol stacks 306.It Pa netnatm/ 307NATM include files; 308see 309.Xr natm 4 310.Bl -tag -width ".Pa kerberos5/" -compact 311.It Pa api/ 312include files for the signalling API 313.It Pa msg/ 314include files that describe signalling messages and 315declare associated functions 316.It Pa saal/ 317include files for the signalling AAL layer 318.It Pa sig/ 319include files for the UNI signalling protocol 320.El 321.It Pa netsmb/ 322SMB/CIFS requester 323.It Pa nfs/ 324C include files for NFS (Network File System) version 2 and 3 (legacy) 325.It Pa objc/ 326Objective C include files 327.It Pa openssl/ 328OpenSSL (Cryptography/SSL toolkit) headers 329.It Pa pccard/ 330PC-CARD controllers 331.It Pa protocols/ 332C include files for Berkeley service protocols 333.It Pa readline/ 334get a line from a user, with editing; 335see 336.Xr readline 3 337.It Pa rpc/ 338remote procedure calls; 339see 340.Xr rpc 3 341.It Pa rpcsvc/ 342definition of RPC service structures; see 343.Xr rpc 3 344.It Pa security/ 345PAM; see 346.Xr pam 8 347.It Pa sys/ 348system C include files (kernel data structures) 349.\" .It Pa tcl/ 350.\" Tcl language; 351.\" see 352.\" .Xr Tcl n 353.\" .Bl -tag -width ".Pa kerberos5/" -compact 354.\" .It Pa generic/ 355.\" ??? 356.\" .It Pa unix/ 357.\" ??? 358.\" .El 359.It Pa ufs/ 360C include files for UFS (The U-word File System) 361.Bl -tag -width ".Pa kerberos5/" -compact 362.It Pa ffs/ 363Fast file system 364.It Pa ufs/ 365UFS file system 366.El 367.It Pa vm/ 368virtual memory; 369see 370.Xr vmstat 8 371.El 372.Pp 373.It Pa lib/ 374shared and archive 375.Xr ar 1 Ns -type 376libraries 377.Bl -tag -width Fl -compact 378.It Pa aout/ 379a.out archive libraries 380.It Pa compat/ 381shared libraries for compatibility 382.Bl -tag -width Fl -compact 383.It Pa aout/ 384a.out backward compatibility libraries 385.El 386.It Pa dtrace/ 387DTrace library scripts 388.It Pa engines/ 389OpenSSL (Cryptography/SSL toolkit) dynamically loadable engines 390.El 391.Pp 392.It Pa libdata/ 393miscellaneous utility data files 394.Bl -tag -width Fl -compact 395.It Pa gcc/ 396.Xr gcc 1 397configuration data 398.It Pa ldscripts/ 399linker scripts; 400see 401.Xr ld 1 402.It Pa lint/ 403various prebuilt lint libraries; 404see 405.Xr lint 1 406.El 407.Pp 408.It Pa libexec/ 409system daemons & system utilities (executed by other programs) 410.Bl -tag -width Fl -compact 411.It Pa aout/ 412utilities to manipulate a.out executables 413.It Pa elf/ 414utilities to manipulate ELF executables 415.It Pa lpr/ 416utilities and filters for LP print system; 417see 418.Xr lpr 1 419.It Pa sendmail/ 420the 421.Xr sendmail 8 422binary; 423see 424.Xr mailwrapper 8 425.It Pa sm.bin/ 426restricted shell for 427.Xr sendmail 8 ; 428see 429.Xr smrsh 8 430.El 431.Pp 432.It Pa local/ 433local executables, libraries, etc. 434Also used as the default destination for the 435.Fx 436ports framework. 437Within local/, the general layout sketched out by 438.Nm 439for /usr 440should be used. 441Exceptions are the man directory (directly under local/ 442rather than under local/share/), ports documentation (in share/doc/<port>/), 443and /usr/local/etc (mimics /etc). 444.It Pa obj/ 445architecture-specific target tree produced by building the /usr/src tree 446.It Pa ports/ 447The 448.Fx 449ports collection (optional). 450.It Pa sbin/ 451system daemons & system utilities (executed by users) 452.It Pa share/ 453architecture-independent files 454.Pp 455.Bl -tag -width ".Pa calendar/" -compact 456.It Pa calendar/ 457a variety of pre-fab calendar files; 458see 459.Xr calendar 1 460.It Pa dict/ 461word lists; 462see 463.Xr look 1 464.Pp 465.Bl -tag -width Fl -compact 466.It Pa freebsd 467.Fx Ns -specific 468terms, proper names, and jargon 469.It Pa words 470common words 471.It Pa web2 472words from Webster's 2nd International 473.It Pa papers/ 474reference databases; 475see 476.Xr refer 1 477.El 478.Pp 479.It Pa doc/ 480miscellaneous documentation; 481source for most of the printed 482.Bx 483manuals (available 484from the 485.Tn USENIX 486association) 487.Bl -tag -width Fl -compact 488.It Pa FAQ/ 489Frequently Asked Questions 490.It Pa IPv6/ 491implementation notes for IPv6 492.It Pa bind/ 493documents pertaining to BIND (the Berkeley Internet Name Domain) 494.It Pa es/ 495Spanish translations of documents in /usr/share/doc 496.It Pa handbook/ 497.Fx 498Handbook 499.It Pa ja/ 500Japanese translations of documents in /usr/share/doc 501.It Pa legal/ 502License files for vendor supplied firmwares 503.It Pa ncurses/ 504HTML documents pertaining to ncurses; 505see 506.Xr ncurses 3 507.It Pa ntp/ 508HTML documents pertaining to the Network Time Protocol 509.It Pa papers/ 510UNIX Papers 511.It Pa psd/ 512UNIX Programmer's Supplementary Documents 513.It Pa ru/ 514Russian translations of documents in /usr/share/doc 515.It Pa smm/ 516UNIX System Manager's Manual 517.It Pa tutorials/ 518.Fx 519tutorials 520.It Pa usd/ 521UNIX User's Supplementary Documents 522.It Pa zh/ 523Chinese translations of documents in /usr/share/doc 524.El 525.Pp 526.It Pa examples/ 527various examples for users and programmers 528.It Pa games/ 529ASCII text files used by various games 530.It Pa groff_font/ 531device description file for device name 532.It Pa info/ 533GNU Info hypertext system 534.It Pa locale/ 535localization files; 536see 537.Xr setlocale 3 538.It Pa man/ 539manual pages 540.It Pa mdocml/ 541data files used by mdocml 542.It Pa me/ 543macros for use with the me macro package; 544see 545.Xr me 7 546.It Pa misc/ 547miscellaneous system-wide ASCII text files 548.Bl -tag -width Fl -compact 549.It Pa fonts/ 550??? 551.It Pa termcap 552terminal characteristics database; 553see 554.Xr termcap 5 555.El 556.It Pa mk/ 557templates for make; 558see 559.Xr make 1 560.It Pa nls/ 561national language support files; 562see 563.Xr mklocale 1 564.It Pa security/ 565data files for security policies such as 566.Xr mac_lomac 4 567.It Pa sendmail/ 568.Xr sendmail 8 569configuration files 570.It Pa skel/ 571example 572.Pa .\& 573(dot) files for new accounts 574.It Pa snmp/ 575MIBs, example files and tree definitions for the SNMP daemon. 576.Bl -tag -width Fl -compact 577.It Pa defs/ 578Tree definition files for use with 579.Xr gensnmptree 1 580.It Pa mibs/ 581MIB files 582.El 583.It Pa syscons/ 584files used by syscons; 585see 586.Xr syscons 4 587.Bl -tag -width ".Pa scrnmaps/" -compact 588.It Pa fonts/ 589console fonts; 590see 591.Xr vidcontrol 1 592and 593.Xr vidfont 1 594.It Pa keymaps/ 595console keyboard maps; 596see 597.Xr kbdcontrol 1 598and 599.Xr kbdmap 1 600.It Pa scrnmaps/ 601console screen maps 602.El 603.It Pa tabset/ 604tab description files for a variety of terminals; used in 605the termcap file; 606see 607.Xr termcap 5 608.It Pa tmac/ 609text processing macros; 610see 611.Xr nroff 1 612and 613.Xr troff 1 614.It Pa vi/ 615localization support and utilities for 616.Xr vi 1 617.It Pa zoneinfo/ 618timezone configuration information; 619see 620.Xr tzfile 5 621.El 622.It Pa src/ 623.Bx , 624third-party, and/or local source files 625.Pp 626.Bl -tag -width ".Pa kerberos5/" -compact 627.It Pa bin/ 628source code for files in /bin 629.It Pa cddl/ 630Utilities covered by the Common Development and Distribution License 631.It Pa contrib/ 632source code for contributed software 633.It Pa crypto/ 634source code for contributed cryptography software 635.It Pa etc/ 636source code for files in /etc 637.It Pa games/ 638source code for files in /usr/games 639.It Pa gnu/ 640Utilities covered by the GNU General Public License 641.It Pa include/ 642source code for files in /usr/include 643.It Pa kerberos5/ 644build infrastructure for kerberos version 5 645.It Pa lib/ 646source code for files in /usr/lib 647.It Pa libexec/ 648source code for files in /usr/libexec 649.It Pa release/ 650files required to produce a 651.Fx 652release 653.It Pa sbin/ 654source code for files in /sbin 655.It Pa secure/ 656build directory for files in /usr/src/crypto 657.It Pa share/ 658source for files in /usr/share 659.It Pa sys/ 660kernel source code 661.It Pa tools/ 662tools used for maintenance and testing of 663.Fx 664.It Pa usr.bin/ 665source code for files in /usr/bin 666.It Pa usr.sbin/ 667source code for files in /usr/sbin 668.El 669.El 670.It Pa /var/ 671multi-purpose log, temporary, transient, and spool files 672.Pp 673.Bl -tag -width ".Pa preserve/" -compact 674.It Pa account/ 675system accounting files 676.Pp 677.Bl -tag -width Fl -compact 678.It Pa acct 679execution accounting file; 680see 681.Xr acct 5 682.El 683.Pp 684.It Pa at/ 685timed command scheduling files; 686see 687.Xr \&at 1 688.Bl -tag -width ".Pa preserve/" -compact 689.It Pa jobs/ 690directory containing job files 691.It Pa spool/ 692directory containing output spool files 693.El 694.Pp 695.It Pa backups/ 696miscellaneous backup files 697.It Pa crash/ 698default directory to store kernel crash dumps; see 699.Xr crash 8 700and 701.Xr savecore 8 702.It Pa cron/ 703files used by cron; 704see 705.Xr cron 8 706.Bl -tag -width ".Pa preserve/" -compact 707.It Pa tabs/ 708crontab files; 709see 710.Xr crontab 5 711.El 712.Pp 713.It Pa db/ 714miscellaneous automatically generated system-specific database files 715.It Pa empty/ 716empty directory for use by programs that need a specifically empty directory. 717Used for instance by 718.Xr sshd 8 719for privilege separation. 720.It Pa games/ 721miscellaneous game status and score files 722.It Pa heimdal/ 723kerberos server databases; see 724.Xr kdc 8 725.It Pa log/ 726miscellaneous system log files 727.Pp 728.Bl -tag -width Fl -compact 729.It Pa utx.lastlogin 730last login log; 731see 732.Xr getutxent 3 733.It Pa utx.log 734login/logout log; 735see 736.Xr getutxent 3 737.El 738.Pp 739.It Pa mail/ 740user mailbox files 741.It Pa msgs/ 742system messages database; 743see 744.Xr msgs 1 745.It Pa preserve/ 746temporary home of files preserved after an accidental death 747of an editor; 748see 749.Xr \&ex 1 750.It Pa quotas/ 751file system quota information files 752.It Pa run/ 753system information files describing various info about 754system since it was booted 755.Pp 756.Bl -tag -width Fl -compact 757.It Pa named/ 758writable by the 759.Dq bind 760user; see 761.Xr named 8 762.It Pa ppp/ 763writable by the 764.Dq network 765group for command connection sockets; see 766.Xr ppp 8 767.It Pa utx.active 768database of current users; 769see 770.Xr getutxent 3 771.El 772.Pp 773.It Pa rwho/ 774rwho data files; 775see 776.Xr rwhod 8 , 777.Xr rwho 1 , 778and 779.Xr ruptime 1 780.It Pa spool/ 781miscellaneous printer and mail system spooling directories 782.Pp 783.Bl -tag -width Fl -compact 784.It Pa clientmqueue/ 785undelivered submission mail queue; 786see 787.Xr sendmail 8 788.It Pa ftp/ 789commonly ~ftp; the anonymous ftp root directory 790.It Pa mqueue/ 791undelivered mail queue; 792see 793.Xr sendmail 8 794.It Pa output/ 795line printer spooling directories 796.El 797.Pp 798.It Pa tmp/ 799temporary files that are kept between system reboots 800.Bl -tag -width Fl -compact 801.It Pa vi.recover/ 802the directory where recovery files are stored 803.El 804.It Pa yp/ 805the NIS maps 806.El 807.El 808.Sh NOTES 809This manual page documents the default 810.Fx 811file system layout, but 812the actual hierarchy on a given system is defined at the system 813administrator's discretion. 814A well-maintained installation will include a customized version of 815this document. 816.Sh SEE ALSO 817.Xr apropos 1 , 818.Xr find 1 , 819.Xr finger 1 , 820.Xr grep 1 , 821.Xr ls 1 , 822.Xr whatis 1 , 823.Xr whereis 1 , 824.Xr which 1 , 825.Xr fd 4 , 826.Xr devfs 5 , 827.Xr fsck 8 828.Sh HISTORY 829A 830.Nm 831manual page appeared in 832.At v7 . 833