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