xref: /freebsd-13-stable/share/man/man7/hier.7 (revision 24115b70d6d614ed7ac5cfc4f51fa9d6cfe8b1b2)
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.\"
30.Dd July 6, 2023
31.Dt HIER 7
32.Os
33.Sh NAME
34.Nm hier
35.Nd layout of file systems
36.Sh SYNOPSIS
37An overview of the file system hierarchy.
38.Sh DESCRIPTION
39.Bl -tag -width "/libexec/"
40.It Pa /
41root directory
42.It Pa /bin/
43user utilities that are fundamental to single-user and multi-user modes
44.It Pa /boot/
45programs and configuration files used during bootstrap of the operating system
46.Pp
47.Bl -tag -width "nvmecontrol/" -compact
48.It Pa defaults/
49default bootstrap configuration files; see
50.Xr loader.conf 5
51.It Pa dtb/
52compiled flattened device tree (FDT) files; see
53.Xr fdt 4
54and
55.Xr dtc 1
56.Pp
57.Bl -tag -width "overlays/" -compact
58.It Pa overlays/
59compiled flattened device tree (FDT) overlays; these can be applied using the
60.Va fdt_overlays
61setting in
62.Xr loader.conf 5
63.El
64.Pp
65.It Pa efi/
66mount point for the EFI System Partition (ESP) on UEFI systems
67.It Pa firmware/
68loadable kernel modules containing binary firmware, for hardware to which
69firmware must be downloaded
70.It Pa kernel/
71pure kernel executable (the operating system loaded into memory at boot time)
72and kernel modules
73.It Pa modules/
74third-party loadable kernel modules, such as those associated with
75.Xr ports 7
76.It Pa zfs/
77.Xr zfs 8
78pool cache files
79.El
80.It Pa /compat/
81files supporting binary compatibility with other operating systems
82.Pp
83.Bl -tag -width "nvmecontrol/" -compact
84.It Pa linux/
85default location for
86.Xr linux 4
87compatibility run-time
88.El
89.Pp
90.It Pa /dev/
91the normal mount point for
92.Xr devfs 5
93.Pp
94.Bl -tag -width "nvmecontrol/" -compact
95.It Pa fd/
96file descriptor files; see
97.Xr fd 4
98.El
99.It Pa /home/
100user HOME directories.
101This is a symlink to
102.Pa /usr/home/
103.It Pa /etc/
104system configuration files and scripts
105.Pp
106.Bl -tag -width "nvmecontrol/" -compact
107.It Pa bluetooth/
108bluetooth configuration files
109.It Pa defaults/
110default system configuration files; see
111.Xr rc 8
112.It Pa localtime
113local timezone information; see
114.Xr ctime 3
115.It Pa mail/
116.Xr sendmail 8
117control files
118.It Pa mtree/
119.Xr mtree 8
120configuration files
121.It Pa pam.d/
122configuration files for the Pluggable Authentication Modules (PAM) library; see
123.Xr pam 3
124.It Pa periodic/
125scripts that are run daily, weekly, or monthly by
126.Xr cron 8 ;
127see
128.Xr periodic 8
129.It Pa ppp/
130PPP configuration files; see
131.Xr ppp 8
132.It Pa rc.d/
133system and daemon startup/control scripts; see
134.Xr rc 8
135.It Pa security/
136OpenBSM audit configuration files; see
137.Xr audit 8
138.It Pa ssh/
139OpenSSH configuration files; see
140.Xr ssh 1
141.It Pa ssl/
142OpenSSL configuration files
143.El
144.It Pa /lib/
145system libraries that are critical to binaries in
146.Pa /bin
147and
148.Pa /sbin
149.Pp
150.Bl -tag -width "nvmecontrol/" -compact
151.It Pa casper/
152service-specific
153.Xr libcasper 3
154Capsicum support libraries
155.It Pa geom/
156class-specific libraries for the
157.Xr geom 8
158utility
159.It Pa nvmecontrol/
160vendor-specific libraries to extend the
161.Xr nvmecontrol 8
162utility
163.El
164.It Pa /libexec/
165system utilities that are critical to binaries in
166.Pa /bin
167and
168.Pa /sbin
169.It Pa /media/
170empty directory commonly containing mount points for removable media such as
171USB drives, CDs, and DVDs
172.It Pa /mnt/
173empty directory commonly used by system administrators as a temporary mount
174point
175.It Pa /net/
176automounted NFS shares; see
177.Xr auto_master 5
178.It Pa /nonexistent/
179a non-existent directory; conventionally, a home directory for special user
180accounts that do not require a home directory.  See also
181.Pa /var/empty/
182.It Pa /proc/
183process file system; see
184.Xr procfs 5
185.It Pa /rescue/
186statically-linked programs for emergency recovery; see
187.Xr rescue 8
188.It Pa /root/
189home directory of the root user
190.It Pa /sbin/
191system programs and administration utilities that are fundamental to
192single-user and multi-user modes
193.It Pa /tmp/
194temporary files that may be removed by
195.Xr rc 8 ;
196see the
197.Va clear_tmp_enable
198variable of
199.Xr rc.conf 5
200.It Pa /usr/
201contains the majority of user utilities and applications
202.Pp
203.Bl -tag -width "freebsd-dist/" -compact
204.It Pa bin/
205common utilities, programming tools, and applications
206.It Pa freebsd-dist/
207distribution files
208.Pq like base.txz ; see
209.Xr release 7
210and
211.Xr bsdinstall 8
212.It Pa include/
213standard C include files
214.It Pa home/
215users' HOME directories;
216the layout is not standardized, but a typical interactive user
217.Dv beastie
218might receive their own directory under
219.Pa /usr/home/beastie
220.It Pa lib/
221shared and archive
222.Xr ar 1 Ns -type
223libraries
224.Pp
225.Bl -tag -width Fl -compact
226.It Pa compat/
227shared libraries for compatibility
228.It Pa debug/
229standalone debug data for the kernel and base system libraries and binaries
230.It Pa dtrace/
231DTrace library scripts
232.It Pa engines/
233OpenSSL (Cryptography/SSL toolkit) dynamically loadable engines
234.El
235.Pp
236.It Pa libdata/
237miscellaneous utility data files
238.Pp
239.Bl -tag -width Fl -compact
240.It Pa gcc/
241GCC configuration data
242.It Pa ldscripts/
243linker scripts; see
244.Xr ld 1
245.It Pa pkgconfig/
246.Xr pc 5 Pq Pa ports/devel/pkgconf
247files; collections of compiler flags, linker flags, and other information
248relevant to library use
249.El
250.Pp
251.It Pa libexec/
252system daemons and system utilities that are executed by other programs
253.Pp
254.Bl -tag -width Fl -compact
255.It Pa aout/
256utilities to manipulate a.out executables
257.It Pa elf/
258utilities to manipulate ELF executables
259.It Pa lpr/
260utilities and filters for LP print system; see
261.Xr lpr 1
262.It Pa sendmail/
263the
264.Xr sendmail 8
265binary; see
266.Xr mailwrapper 8
267.It Pa sm.bin/
268restricted shell for
269.Xr sendmail 8 ;
270see
271.Xr smrsh 8
272.El
273.Pp
274.It Pa local/
275local executables, libraries, etc.
276Also used as the default destination for the
277.Xr ports 7
278framework.
279Within
280.Pa local/ ,
281the general layout sketched out by
282.Nm
283for
284.Pa /usr
285should be used.
286Exceptions are the ports documentation
287.Po in
288.Pa share/doc/<port>/ Ns Pc ,
289and
290.Pa /usr/local/etc
291.Po mimics
292.Pa /etc Ns Pc .
293.It Pa obj/
294architecture-specific target tree produced by building
295.Fx
296from source; see
297.Xr build 7
298.It Pa ports/
299.Fx
300ports collection; see
301.Xr ports 7
302.It Pa sbin/
303system daemons and system utilities that are executed by users
304.It Pa share/
305architecture-independent files
306.Pp
307.Bl -tag -width Fl -compact
308.It Pa calendar/
309system-wide calendar files; see
310.Xr calendar 1
311.It Pa dict/
312word lists; see
313.Xr look 1
314.Pp
315.Bl -tag -width Fl -compact
316.It Pa freebsd
317.Fx Ns -specific
318terms, proper names, and jargon
319.It Pa web2
320words from Webster's Second International
321.El
322.Pp
323.It Pa doc/
324miscellaneous documentation
325.It Pa examples/
326various examples for users and programmers
327.It Pa firmware/
328firmware images loaded by userland programs
329.It Pa games/
330used by various games
331.It Pa keys/
332known trusted and revoked keys
333.Pp
334.Bl -tag -width Fl -compact
335.It Pa pkg/
336fingerprints for
337.Xr pkg 7
338and
339.Xr pkg 8
340.El
341.Pp
342.It Pa locale/
343localization files; see
344.Xr setlocale 3
345.It Pa man/
346manual pages
347.It Pa misc/
348miscellaneous system-wide files
349.Pp
350.Bl -tag -width Fl -compact
351.It Pa termcap
352terminal characteristics database; see
353.Xr termcap 5
354.El
355.Pp
356.It Pa mk/
357templates for make; see
358.Xr make 1
359.It Pa nls/
360national language support files
361.It Pa security/
362data files for security policies such as
363.Xr mac_lomac 4
364.It Pa sendmail/
365.Xr sendmail 8
366configuration files
367.It Pa skel/
368example
369.Pa .\&
370(dot) files for new accounts
371.It Pa snmp/
372MIBs, example files and tree definitions for the SNMP daemon
373.Pp
374.Bl -tag -width Fl -compact
375.It Pa defs/
376tree definition files for use with
377.Xr gensnmptree 1
378.It Pa mibs/
379MIB files
380.El
381.Pp
382.It Pa syscons/
383.Xr syscons 4
384files
385.Pp
386.Bl -tag -width Fl -compact
387.It Pa fonts/
388console fonts; see
389.Xr vidcontrol 1
390and
391.Xr vidfont 1
392.It Pa keymaps/
393console keyboard maps; see
394.Xr kbdcontrol 1
395and
396.Xr kbdmap 1
397.It Pa scrnmaps/
398console screen maps
399.El
400.It Pa tabset/
401tab description files for a variety of terminals; used in the termcap file;
402see
403.Xr termcap 5
404.It Pa vi/
405localization support and utilities for
406.Xr vi 1
407.It Pa vt/
408.Xr vt 4
409files
410.Pp
411.Bl -tag -width Fl -compact
412.It Pa fonts/
413console fonts; see
414.Xr vidcontrol 1
415and
416.Xr vidfont 1
417.It Pa keymaps/
418console keyboard maps; see
419.Xr kbdcontrol 1
420and
421.Xr kbdmap 1
422.\" .It Pa scrnmaps/
423.\" console screen maps
424.El
425.Pp
426.It Pa zoneinfo/
427timezone configuration information; see
428.Xr tzfile 5
429.El
430.Pp
431.It Pa src/
432.Fx
433source code; see
434.Xr development 7 .
435The layout of the source tree is described by the top-level
436.Pa README.md
437file.
438.Pp
439.It Pa tests/
440the
441.Fx
442test suite; see
443.Xr tests 7
444.El
445.It Pa /var/
446log, temporary, transient, and spool files
447.Pp
448.Bl -tag -width "preserve/" -compact
449.It Pa account/
450system accounting files
451.Pp
452.Bl -tag -width Fl -compact
453.It Pa acct
454execution accounting file; see
455.Xr acct 5
456.El
457.Pp
458.It Pa at/
459timed command scheduling files; see
460.Xr at 1
461.Pp
462.Bl -tag -width Fl -compact
463.It Pa jobs/
464job files
465.It Pa spool/
466output spool files
467.El
468.Pp
469.It Pa backups/
470miscellaneous backup files
471.It Pa cache/
472miscellaneous cache files
473.Pp
474.Bl -tag -width Fl -compact
475.It Pa pkg/
476cached packages for
477.Xr pkg 8
478.El
479.Pp
480.It Pa crash/
481default directory for kernel crash dumps; see
482.Xr crash 8
483and
484.Xr savecore 8
485.It Pa cron/
486.Xr cron 8
487files
488.Pp
489.Bl -tag -width Fl -compact
490.It Pa tabs/
491.Xr crontab 5
492files
493.El
494.Pp
495.It Pa db/
496miscellaneous automatically-generated system-specific database files
497.Pp
498.Bl -tag -width "freebsd-update/" -compact
499.It Pa freebsd-update/
500temporary files and downloads for
501.Xr freebsd-update 8
502.El
503.Pp
504.It Pa empty/
505for use by programs that require an empty directory.
506Uses include privilege separation by
507.Xr sshd 8
508.It Pa games/
509miscellaneous game status and score files
510.It Pa heimdal/
511Kerberos server databases; see
512.Xr kdc 8
513.It Pa log/
514miscellaneous system log files
515.Pp
516.Bl -tag -width "utx.lastlogin" -compact
517.It Pa utx.lastlogin
518last login log; see
519.Xr getutxent 3
520.It Pa utx.log
521login/logout log; see
522.Xr getutxent 3
523.El
524.Pp
525.It Pa mail/
526user mailbox files
527.It Pa msgs/
528system messages database; see
529.Xr msgs 1
530.It Pa preserve/
531unused, present for historical reasons
532.It Pa quotas/
533file system quota information files
534.It Pa run/
535files containing information about the operating system since it was booted
536.Pp
537.Bl -tag -width Fl -compact
538.It Pa bhyve/
539.Xr bhyve 8
540virtual machine
541.Xr unix 4 Ns -domain sockets
542.It Pa ppp/
543writable by the
544.Dq network
545group for command connection sockets; see
546.Xr ppp 8
547.It Pa utx.active
548database of current users; see
549.Xr getutxent 3
550.El
551.Pp
552.It Pa rwho/
553rwho data files; see
554.Xr rwhod 8 ,
555.Xr rwho 1 ,
556and
557.Xr ruptime 1
558.It Pa spool/
559miscellaneous printer and mail system spooling directories
560.Pp
561.Bl -tag -width "clientmqueue/" -compact
562.It Pa clientmqueue/
563undelivered submission mail queue; see
564.Xr sendmail 8
565.It Pa ftp/
566ftp root directory; see
567.Xr ftpd 8
568.It Pa mqueue/
569undelivered mail queue; see
570.Xr sendmail 8
571.It Pa output/
572line printer spooling directories
573.El
574.Pp
575.It Pa tmp/
576temporary files that are not removed by
577.Xr rc 8
578.Pp
579.Bl -tag -width "vi.recover/" -compact
580.It Pa vi.recover/
581.Xr vi 1
582recovery files
583.El
584.Pp
585.It Pa yp/
586the NIS maps; see
587.Xr yp 8
588.El
589.El
590.Sh NOTES
591This manual page documents the default
592.Fx
593file system layout.
594The actual hierarchy on a given system is defined at the system
595administrator's discretion.
596A well-maintained installation will include a customized version of
597this document.
598.Sh SEE ALSO
599.Xr apropos 1 ,
600.Xr find 1 ,
601.Xr grep 1 ,
602.Xr ls 1 ,
603.Xr whereis 1 ,
604.Xr which 1
605.Sh HISTORY
606A
607.Nm
608manual page appeared in
609.At v7 .
610