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