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