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