Debian Codegraph @

HTML/systemdirs.html

raw symbols SCIP
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >Important System Directories</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
9 "><LINK
10 REL="HOME"
11 TITLE="Advanced Bash-Scripting Guide"
12 HREF="index.html"><LINK
13 REL="PREVIOUS"
14 TITLE=" Important Files"
15 HREF="files.html"><LINK
16 REL="NEXT"
17 TITLE="An Introduction to Programmable Completion"
18 HREF="tabexpansion.html"><META
19 HTTP-EQUIV="Content-Style-Type"
20 CONTENT="text/css"><LINK
21 REL="stylesheet"
22 HREF="common/kde-common.css"
23 TYPE="text/css"><META
24 HTTP-EQUIV="Content-Type"
25 CONTENT="text/html; charset=iso-8859-1"><META
26 HTTP-EQUIV="Content-Language"
27 CONTENT="en"><LINK
28 REL="stylesheet"
29 HREF="common/kde-localised.css"
30 TYPE="text/css"
31 TITLE="KDE-English"><LINK
32 REL="stylesheet"
33 HREF="common/kde-default.css"
34 TYPE="text/css"
35 TITLE="KDE-Default"></HEAD
36 ><BODY
37 CLASS="APPENDIX"
38 BGCOLOR="#FFFFFF"
39 TEXT="#000000"
40 LINK="#AA0000"
41 VLINK="#AA0055"
42 ALINK="#AA0000"
43 STYLE="font-family: sans-serif;"
44 ><DIV
45 CLASS="NAVHEADER"
46 ><TABLE
47 SUMMARY="Header navigation table"
48 WIDTH="100%"
49 BORDER="0"
50 CELLPADDING="0"
51 CELLSPACING="0"
52 ><TR
53 ><TH
54 COLSPAN="3"
55 ALIGN="center"
56 >Advanced Bash-Scripting Guide: An in-depth exploration of the art of shell scripting</TH
57 ></TR
58 ><TR
59 ><TD
60 WIDTH="10%"
61 ALIGN="left"
62 VALIGN="bottom"
63 ><A
64 HREF="files.html"
65 ACCESSKEY="P"
66 >Prev</A
67 ></TD
68 ><TD
69 WIDTH="80%"
70 ALIGN="center"
71 VALIGN="bottom"
72 ></TD
73 ><TD
74 WIDTH="10%"
75 ALIGN="right"
76 VALIGN="bottom"
77 ><A
78 HREF="tabexpansion.html"
79 ACCESSKEY="N"
80 >Next</A
81 ></TD
82 ></TR
83 ></TABLE
84 ><HR
85 ALIGN="LEFT"
86 WIDTH="100%"></DIV
87 ><DIV
88 CLASS="APPENDIX"
89 ><H1
90 ><A
91 NAME="SYSTEMDIRS"
92 ></A
93 >Appendix I. Important System Directories</H1
94 ><P
95 >Sysadmins and anyone else writing administrative scripts
96 should be intimately familiar with the following system
97 directories.</P
98 ><UL
99 ><LI
100 ><P
101 ><TT
102 CLASS="FILENAME"
103 >/bin</TT
104 ></P
105 ><P
106 >Binaries (executables). Basic system programs
107 and utilities (such as <B
108 CLASS="COMMAND"
109 >bash</B
110 >).</P
111 ></LI
112 ><LI
113 ><P
114 ><TT
115 CLASS="FILENAME"
116 >/usr/bin</TT
117 >
118
119 <A
120 NAME="AEN23969"
121 HREF="#FTN.AEN23969"
122 >[1]</A
123 >
124
125 </P
126 ><P
127 >More system binaries.</P
128 ></LI
129 ><LI
130 ><P
131 ><TT
132 CLASS="FILENAME"
133 >/usr/local/bin</TT
134 ></P
135 ><P
136 >Miscellaneous binaries local to the particular machine.</P
137 ></LI
138 ><LI
139 ><P
140 ><TT
141 CLASS="FILENAME"
142 >/sbin</TT
143 ></P
144 ><P
145 >System binaries. Basic system administrative programs
146 and utilities (such as <B
147 CLASS="COMMAND"
148 >fsck</B
149 >).</P
150 ></LI
151 ><LI
152 ><P
153 ><TT
154 CLASS="FILENAME"
155 >/usr/sbin</TT
156 ></P
157 ><P
158 >More system administrative programs and utilities.</P
159 ></LI
160 ><LI
161 ><P
162 ><TT
163 CLASS="FILENAME"
164 >/etc</TT
165 ></P
166 ><P
167 ><I
168 CLASS="FIRSTTERM"
169 >Et cetera</I
170 >. Systemwide configuration
171 scripts.</P
172 ><P
173 >Of particular interest are the
174 <A
175 HREF="system.html#FSTABREF"
176 ><TT
177 CLASS="FILENAME"
178 >/etc/fstab</TT
179 ></A
180 >
181 (filesystem table),
182 <TT
183 CLASS="FILENAME"
184 >/etc/mtab</TT
185 >
186 (mounted filesystem table), and the <A
187 HREF="system.html#INITTABREF"
188 ><TT
189 CLASS="FILENAME"
190 >/etc/inittab</TT
191 ></A
192 >
193 files.</P
194 ></LI
195 ><LI
196 ><P
197 ><TT
198 CLASS="FILENAME"
199 >/etc/rc.d</TT
200 ></P
201 ><P
202 >Boot scripts, on Red Hat and derivative distributions
203 of Linux.</P
204 ></LI
205 ><LI
206 ><P
207 ><TT
208 CLASS="FILENAME"
209 >/usr/share/doc</TT
210 ></P
211 ><P
212 >Documentation for installed packages.</P
213 ></LI
214 ><LI
215 ><P
216 ><TT
217 CLASS="FILENAME"
218 >/usr/man</TT
219 ></P
220 ><P
221 >The systemwide <A
222 HREF="external.html#MANREF"
223 >manpages</A
224 >.</P
225 ></LI
226 ><LI
227 ><P
228 ><TT
229 CLASS="FILENAME"
230 >/dev</TT
231 ></P
232 ><P
233 >Device directory. Entries (but <SPAN
234 CLASS="emphasis"
235 ><I
236 CLASS="EMPHASIS"
237 >not</I
238 ></SPAN
239 >
240 mount points) for physical and virtual devices.
241 See <A
242 HREF="devproc.html"
243 >Chapter 29</A
244 >.</P
245 ></LI
246 ><LI
247 ><P
248 ><TT
249 CLASS="FILENAME"
250 >/proc</TT
251 ></P
252 ><P
253 >Process directory. Contains information and statistics
254 about running processes and kernel parameters.
255 See <A
256 HREF="devproc.html"
257 >Chapter 29</A
258 >.</P
259 ></LI
260 ><LI
261 ><P
262 ><TT
263 CLASS="FILENAME"
264 >/sys</TT
265 ></P
266 ><P
267 >Systemwide device directory. Contains information and
268 statistics about device and device names. This is newly
269 added to Linux with the 2.6.X kernels.</P
270 ></LI
271 ><LI
272 ><P
273 ><TT
274 CLASS="FILENAME"
275 >/mnt</TT
276 ></P
277 ><P
278 ><I
279 CLASS="FIRSTTERM"
280 >Mount</I
281 >. Directory for mounting
282 hard drive partitions, such as <TT
283 CLASS="FILENAME"
284 >/mnt/dos</TT
285 >, and physical
286 devices. In newer Linux distros, the <TT
287 CLASS="FILENAME"
288 >/media</TT
289 > directory has taken
290 over as the preferred mount point for I/O devices.</P
291 ></LI
292 ><LI
293 ><P
294 ><TT
295 CLASS="FILENAME"
296 >/media</TT
297 ></P
298 ><P
299 >In newer Linux distros, the preferred mount point for
300 I/O devices, such as CD/DVD drives or USB flash drives.</P
301 ></LI
302 ><LI
303 ><P
304 ><TT
305 CLASS="FILENAME"
306 >/var</TT
307 ></P
308 ><P
309 ><I
310 CLASS="FIRSTTERM"
311 >Variable</I
312 > (changeable) system
313 files. This is a catchall <SPAN
314 CLASS="QUOTE"
315 >"scratchpad"</SPAN
316 >
317 directory for data generated while a Linux/UNIX machine
318 is running.</P
319 ></LI
320 ><LI
321 ><P
322 ><TT
323 CLASS="FILENAME"
324 >/var/log</TT
325 ></P
326 ><P
327 >Systemwide log files.</P
328 ></LI
329 ><LI
330 ><P
331 ><TT
332 CLASS="FILENAME"
333 >/var/spool/mail</TT
334 ></P
335 ><P
336 >User mail spool.</P
337 ></LI
338 ><LI
339 ><P
340 ><TT
341 CLASS="FILENAME"
342 >/lib</TT
343 ></P
344 ><P
345 >Systemwide library files.</P
346 ></LI
347 ><LI
348 ><P
349 ><TT
350 CLASS="FILENAME"
351 >/usr/lib</TT
352 ></P
353 ><P
354 >More systemwide library files.</P
355 ></LI
356 ><LI
357 ><P
358 ><TT
359 CLASS="FILENAME"
360 >/tmp</TT
361 ></P
362 ><P
363 >System temporary files.</P
364 ></LI
365 ><LI
366 ><P
367 ><TT
368 CLASS="FILENAME"
369 >/boot</TT
370 ></P
371 ><P
372 >System <I
373 CLASS="FIRSTTERM"
374 >boot</I
375 > directory. The kernel,
376 module links, system map, and boot manager reside here.</P
377 ><DIV
378 CLASS="WARNING"
379 ><TABLE
380 CLASS="WARNING"
381 WIDTH="90%"
382 BORDER="0"
383 ><TR
384 ><TD
385 WIDTH="25"
386 ALIGN="CENTER"
387 VALIGN="TOP"
388 ><IMG
389 SRC="common/warning.png"
390 HSPACE="5"
391 ALT="Warning"></TD
392 ><TD
393 ALIGN="LEFT"
394 VALIGN="TOP"
395 ><P
396 >Altering files in this directory may result in an
397 unbootable system.</P
398 ></TD
399 ></TR
400 ></TABLE
401 ></DIV
402 ></LI
403 ></UL
404 ></DIV
405 ><H3
406 CLASS="FOOTNOTES"
407 >Notes</H3
408 ><TABLE
409 BORDER="0"
410 CLASS="FOOTNOTES"
411 WIDTH="100%"
412 ><TR
413 ><TD
414 ALIGN="LEFT"
415 VALIGN="TOP"
416 WIDTH="5%"
417 ><A
418 NAME="FTN.AEN23969"
419 HREF="systemdirs.html#AEN23969"
420 >[1]</A
421 ></TD
422 ><TD
423 ALIGN="LEFT"
424 VALIGN="TOP"
425 WIDTH="95%"
426 ><P
427 >Some early UNIX systems had a fast, small-capacity fixed
428 disk (containing <TT
429 CLASS="FILENAME"
430 >/</TT
431 >,
432 the root partition), and a second drive which
433 was larger, but slower (containing <TT
434 CLASS="FILENAME"
435 >/usr</TT
436 > and other
437 partitions). The most frequently used programs and
438 utilities therefore resided on the small-but-fast
439 drive, in <TT
440 CLASS="FILENAME"
441 >/bin</TT
442 >,
443 and the others on the slower drive, in <TT
444 CLASS="FILENAME"
445 >/usr/bin</TT
446 >.</P
447 ><P
448 >This likewise accounts for the split between
449 <TT
450 CLASS="FILENAME"
451 >/sbin</TT
452 > and
453 <TT
454 CLASS="FILENAME"
455 >/usr/sbin</TT
456 >,
457 <TT
458 CLASS="FILENAME"
459 >/lib</TT
460 > and <TT
461 CLASS="FILENAME"
462 >/usr/lib</TT
463 >, etc.</P
464 ></TD
465 ></TR
466 ></TABLE
467 ><DIV
468 CLASS="NAVFOOTER"
469 ><HR
470 ALIGN="LEFT"
471 WIDTH="100%"><TABLE
472 SUMMARY="Footer navigation table"
473 WIDTH="100%"
474 BORDER="0"
475 CELLPADDING="0"
476 CELLSPACING="0"
477 ><TR
478 ><TD
479 WIDTH="33%"
480 ALIGN="left"
481 VALIGN="top"
482 ><A
483 HREF="files.html"
484 ACCESSKEY="P"
485 >Prev</A
486 ></TD
487 ><TD
488 WIDTH="34%"
489 ALIGN="center"
490 VALIGN="top"
491 ><A
492 HREF="index.html"
493 ACCESSKEY="H"
494 >Home</A
495 ></TD
496 ><TD
497 WIDTH="33%"
498 ALIGN="right"
499 VALIGN="top"
500 ><A
501 HREF="tabexpansion.html"
502 ACCESSKEY="N"
503 >Next</A
504 ></TD
505 ></TR
506 ><TR
507 ><TD
508 WIDTH="33%"
509 ALIGN="left"
510 VALIGN="top"
511 >Important Files</TD
512 ><TD
513 WIDTH="34%"
514 ALIGN="center"
515 VALIGN="top"
516 >&nbsp;</TD
517 ><TD
518 WIDTH="33%"
519 ALIGN="right"
520 VALIGN="top"
521 >An Introduction to Programmable Completion</TD
522 ></TR
523 ></TABLE
524 ></DIV
525 ></BODY
526 ></HTML
527 >