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