aboutsummaryrefslogtreecommitdiff
path: root/hier.7
blob: 77d5f919e383e1968a7df82fdb6c7c93079c7bc8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
'\" t
.\"     Title: hier
.\"    Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 2.0.10
.\"      Date: 2020-07-11
.\"    Manual: Mutineer's Guide
.\"    Source: Mutiny
.\"  Language: English
.\"
.TH "HIER" "7" "2020-07-11" "Mutiny" "Mutineer\(aqs Guide"
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.ss \n[.ss] 0
.nh
.ad l
.de URL
\fI\\$2\fP <\\$1>\\$3
..
.als MTO URL
.if \n[.g] \{\
.  mso www.tmac
.  am URL
.    ad l
.  .
.  am MTO
.    ad l
.  .
.  LINKSTYLE blue R < >
.\}
.SH "NAME"
hier \- overview of the filesystem layout
.SH "DESCRIPTION"
.sp
On Mutiny, a filesystem layout is used that attempts to both preserve relative compatibility with
the \fBFilesystem Hierarchy Standard\fP, while also making it a priority to reduce cruft, legacy, and
other unnecessary redundancy where possible.
.SS "Hierarchy"
.sp
The following is a sketch of the filesystem hierarchy.
.sp
\fI/\fP
.RS 4
The root of the filesystem. From here, all flows forth. This is additionally the root user\(cqs
home directory.
.sp
\fI/boot\fP
.RS 4
Files used during the boot process, such as boot loader configuration, kernel executables,
initramfs archives, and so on. If running on an EFI\-enabled system, this whole directory
should be mounted on an EFI partition.
.RE
.sp
\fI/bin\fP
.RS 4
Binaries installed on the system by the package manager, praxis(7), or
through some other system\-managed method.
.RE
.sp
\fI/dev\fP
.RS 4
Device files. This structure is first populated by devtmpfs[1] at boot, and then
after boot, managed by mdevd(8).
.RE
.sp
\fI/etc\fP
.RS 4
System configuration. This directory is first populated by tendency\-config\-populate(1).
.sp
\fIksh/\fP
.RS 4
Files relating to ksh(1).
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fIrc\fP \- Startup file for ksh(1), sourced by \fI/etc/profile\fP. See profile(7).
.RE
.RE
.sp
\fIfstab\fP
.RS 4
\fBF\fPile\fBs\fPystem \fBtab\fPle. It is for specifying what filesystems can be
mounted, and it\(cqs used by commune\-init(8) and mount(8) to mount your
filesystems at boot. See fstab(5).
.RE
.sp
\fIgroup\fP
.RS 4
A list of groups on the system. See group(5).
.RE
.sp
\fIhosts\fP
.RS 4
A table of IP addresses associated with hostnames. See hosts(5).
.RE
.sp
\fIissue\fP
.RS 4
A file containing the message shown prior to the login prompt, printed by
getty(8).
.RE
.sp
\fIpasswd\fP
.RS 4
A list of user accounts on the system. This should be readable by all
users. See passwd(5).
.RE
.sp
\fIprofile\fP
.RS 4
A sh(1) script ran for login shells. See profile(7).
.RE
.sp
\fIshadow\fP
.RS 4
A "shadowed" passwd file: that is to say, it contains encrypted passwords,
while \fI/etc/passwd\fP does not. Fittingly, it should not be readable by
anyone except root. See shadow(5).
.RE
.sp
\fIshells\fP
.RS 4
A list of the shells a user can have as their login shell. See shells(5).
.RE
.RE
.sp
\fI/home\fP
.RS 4
Non\-system users\(aq home directories. There\(cqs no specified directory structure within this
directory, but usually all non\-system users will have a directory under this one as their
home directory.
.RE
.sp
\fI/include\fP
.RS 4
Header files for C and C++ libraries installed by the package manager,
praxis(7), or through some other system\-managed method, used by their
respective compilers, cc(1) and c++(1).
.RE
.sp
\fI/lib\fP
.RS 4
Libraries and other non\-user\-facing executables installed by the package manager, praxis(7),
or through some other system\-managed method.
.sp
\fIos\-release\fP
.RS 4
File containing metadata about the installed OS.
.RE
.RE
.sp
\fI/local\fP
.RS 4
System administrator\-managed prefix. Everything under /local is effectively free reign for
the user to add things without them being touched by any system management things;
praxis(7) never install anything within here.
.RE
.sp
\fI/mnt\fP
.RS 4
Mounted filesystems. They may or may not be filesystems mounted from hotpluggable devices.
There\(cqs no specified directory structure within here.
.RE
.sp
\fI/proc\fP
.RS 4
The mountpoint of a pseudo\-filesystem that provides a filesystem interface to \fIsome\fP data in
the kernel. Most notably, it contains a folder for each process ID on the system.
See proc(5) for more details.
.RE
.sp
\fI/run\fP
.RS 4
Runtime files. That is, files that pertain to the system since it booted up, in some way;
they hold no permanance and are never backed by an actual persistent storage.
It is mounted as a tmpfs(5) filesystem, and exists only in RAM.
.sp
\fItmp\fP
.RS 4
Various temporary files. This is also mounted as a secondary tmpfs(5).
The contents of this directory is visible to all users of the system.
.RE
.sp
\fIuser\fP
.RS 4
User\-specific runtime files.
.sp
\fI<UID>\fP:
.RS 4
Runtime files which are controlled by the user ID \fIUID\fP.
Each directory is created when the user logs in\(emsee login(7).
This directory is marked read/write/execute only for the owner.
.RE
.RE
.RE
.RE
.sp
\fI/share\fP
.RS 4
Resources of various types, installed on the system by the package manager,
praxis(7), or through some other system\-managed method.
.sp
\fIman\fP
.RS 4
System man(1) pages.
\f(CRman*\fP directories under this correspond to manual sections.
.RE
.RE
.sp
\fI/srv\fP
.RS 4
Data served by the system. Most commonly, data served by daemons running on the system,
like an HTTP daemon, git\-daemon(1), and so on.
.RE
.sp
\fI/sys\fP
.RS 4
The mountpoint of a pseudo\-filesystem that provides a filesystem interface to kernel data
structures. See sysfs(5).
.RE
.sp
\fI/var\fP
.RS 4
Persistent, mutable system data. Data that system programs might need sooner or later, and
that might change over multiple boots of the system. Things like databases, logs, caches.
.sp
\fIcache\fP
.RS 4
Cache files.
.RE
.sp
\fIlib\fP
.RS 4
Databases and state files.
.RE
.sp
\fIlog\fP
.RS 4
Log files.
.RE
.sp
\fItmp\fP
.RS 4
Persistent, yet temporary files. It persists across boots, in contrast
to \fI/run/tmp\fP.
.RE
.RE
.SS "Symbolic links"
.sp
A few symbolic links are used in the file hierarchy so as to facilitate compatibilty with some
usually\-common locations that Mutiny does not use.
.sp
\fI/sbin\fP
.RS 4
A symbolic link to "\fIbin\fP". Mutiny merges a lot of (nowadays) redundant directories.
This one is from the era of Unix when \fI/bin\fP and \fI/sbin\fP were kept separate.
.RE
.sp
\fI/tmp\fP
.RS 4
A symbolic link to "\fIrun/tmp\fP", so as not to disturb applications that expect this to be the
temporary filesystem.
.RE
.sp
\fI/usr\fP
.RS 4
A symbolic link to "\fI.\fP" (dot). Mutiny merges a lot of (nowadays) redundant directories.
This one is from the era of Unix when \fI/usr/bin\fP and \fI/bin\fP were kept separate.
.RE
.sp
\fI/var/run\fP
.RS 4
A symbolic link to "\fI../run\fP". This is a location that has been used in the past for runtime
data, in version 2.3 of the Filesystem Hierarchy Standard. In version 3.0, it was deprecated in
favor of \fI/run\fP, but suggests a symbolic link be made.
.RE
.SH "SEE ALSO"
.sp
.URL "https://www.freedesktop.org/software/systemd/man/file\-hierarchy.html" "file\-hierarchy(7)" ""
.sp
Filesystem Hierarchy Standard Group, \c
.URL "https://refspecs.linuxfoundation.org/FHS_2.3/fhs\-2.3.html" "\fIThe Filesystem Hierarchy Standard, version 2.3\fP" ","
January 29, 2004.
.sp
LSB Workgroup, The Linux Foundation, \c
.URL "https://refspecs.linuxfoundation.org/FHS_3.0/fhs\-3.0.html" "\fIThe Filesystem Hierarchy Standard, version 3.0\fP" ","
June 3, 2015.
.sp
Rob Landley, \c
.URL "http://lists.busybox.net/pipermail/busybox/2010\-December/074114.html" "\fIUnderstanding the bin, sbin, usr/bin, usr/sbin Split\fP" ","
December 9, 2010.
.SH "CONTRIBUTING"
.sp
The canonical URL of this repository is \c
.URL "https://git.mutiny.red/mutiny/filesystem" "" "."
Submit patches and bugs to <\c
.MTO "kylie\(atsomas.is" "" ">."
.sp
There is also an IRC channel for Mutiny and other projects at \c
.URL "irc://irc.freenode.net/#mutiny" "" "."
Please don\(cqt hesitate to message if you need help.
.SH "LICENSE"
.sp
\fBfilesystem\fP is in the public domain.
.sp
To the extent possible under law, Kylie McClain <\c
.MTO "kylie\(atsomas.is" "" ">"
has waived all copyright and
related or neighboring rights to this work.
.sp
.URL "http://creativecommons.org/publicdomain/zero/1.0/" "" ""
.SH "NOTES"
1. devtmpfs does not currently have a manual page, and documentation of it in the kernel is slim. See CONFIG_DEVTMPFS and CONFIG_DEVTMPFS_MOUNT in the kernel configuration to see descriptions of what it does.