| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 | <HTML |
| 3 | ><HEAD |
| 4 | ><TITLE |
| 5 | > Important Files</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="Bash Command-Line Options" |
| 15 | HREF="bash-options.html"><LINK |
| 16 | REL="NEXT" |
| 17 | TITLE="Important System Directories" |
| 18 | HREF="systemdirs.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="bash-options.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="systemdirs.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="FILES" |
| 92 | ></A |
| 93 | >Appendix H. Important Files</H1 |
| 94 | ><DIV |
| 95 | CLASS="VARIABLELIST" |
| 96 | ><P |
| 97 | ><B |
| 98 | ><A |
| 99 | NAME="FILESREF1" |
| 100 | ></A |
| 101 | >startup files</B |
| 102 | ></P |
| 103 | ><DL |
| 104 | ><DT |
| 105 | ></DT |
| 106 | ><DD |
| 107 | ><P |
| 108 | >These files contain the aliases and <A |
| 109 | HREF="othertypesv.html#ENVREF" |
| 110 | >environmental variables</A |
| 111 | > |
| 112 | made available to Bash running as a user shell and to all |
| 113 | Bash scripts invoked after system initialization.</P |
| 114 | ></DD |
| 115 | ><DT |
| 116 | ><TT |
| 117 | CLASS="FILENAME" |
| 118 | >/etc/profile</TT |
| 119 | ></DT |
| 120 | ><DD |
| 121 | ><P |
| 122 | >Systemwide defaults, mostly setting the environment |
| 123 | (all Bourne-type shells, not just Bash |
| 124 | <A |
| 125 | NAME="AEN23892" |
| 126 | HREF="#FTN.AEN23892" |
| 127 | >[1]</A |
| 128 | >)</P |
| 129 | ></DD |
| 130 | ><DT |
| 131 | ><TT |
| 132 | CLASS="FILENAME" |
| 133 | >/etc/bashrc</TT |
| 134 | ></DT |
| 135 | ><DD |
| 136 | ><P |
| 137 | >systemwide functions and <A |
| 138 | HREF="aliases.html#ALIASREF" |
| 139 | >aliases</A |
| 140 | > for Bash</P |
| 141 | ></DD |
| 142 | ><DT |
| 143 | ><TT |
| 144 | CLASS="FILENAME" |
| 145 | ><TT |
| 146 | CLASS="VARNAME" |
| 147 | >$HOME</TT |
| 148 | >/.bash_profile</TT |
| 149 | ></DT |
| 150 | ><DD |
| 151 | ><P |
| 152 | >user-specific Bash environmental default settings, |
| 153 | found in each user's home directory (the local counterpart |
| 154 | to <TT |
| 155 | CLASS="FILENAME" |
| 156 | >/etc/profile</TT |
| 157 | >)</P |
| 158 | ></DD |
| 159 | ><DT |
| 160 | ><TT |
| 161 | CLASS="FILENAME" |
| 162 | ><TT |
| 163 | CLASS="VARNAME" |
| 164 | >$HOME</TT |
| 165 | >/.bashrc</TT |
| 166 | ></DT |
| 167 | ><DD |
| 168 | ><P |
| 169 | >user-specific Bash init file, found in each user's home |
| 170 | directory (the local counterpart to |
| 171 | <TT |
| 172 | CLASS="FILENAME" |
| 173 | >/etc/bashrc</TT |
| 174 | >). Only interactive |
| 175 | shells and user scripts read this file. See |
| 176 | <A |
| 177 | HREF="sample-bashrc.html" |
| 178 | >Appendix M</A |
| 179 | > for a sample |
| 180 | <TT |
| 181 | CLASS="FILENAME" |
| 182 | >.bashrc</TT |
| 183 | > file.</P |
| 184 | ></DD |
| 185 | ></DL |
| 186 | ></DIV |
| 187 | ><DIV |
| 188 | CLASS="VARIABLELIST" |
| 189 | ><P |
| 190 | ><B |
| 191 | ><A |
| 192 | NAME="LOGOUTFILEREF1" |
| 193 | ></A |
| 194 | >logout file</B |
| 195 | ></P |
| 196 | ><DL |
| 197 | ><DT |
| 198 | ><TT |
| 199 | CLASS="FILENAME" |
| 200 | ><TT |
| 201 | CLASS="VARNAME" |
| 202 | >$HOME</TT |
| 203 | >/.bash_logout</TT |
| 204 | ></DT |
| 205 | ><DD |
| 206 | ><P |
| 207 | >user-specific instruction file, found in |
| 208 | each user's home directory. Upon exit from a login (Bash) |
| 209 | shell, the commands in this file execute.</P |
| 210 | ></DD |
| 211 | ></DL |
| 212 | ></DIV |
| 213 | ><DIV |
| 214 | CLASS="VARIABLELIST" |
| 215 | ><P |
| 216 | ><B |
| 217 | ><A |
| 218 | NAME="DATAFILESREF1" |
| 219 | ></A |
| 220 | >data files</B |
| 221 | ></P |
| 222 | ><DL |
| 223 | ><DT |
| 224 | ><TT |
| 225 | CLASS="FILENAME" |
| 226 | >/etc/passwd</TT |
| 227 | ></DT |
| 228 | ><DD |
| 229 | ><P |
| 230 | >A listing of all the user accounts on the system, |
| 231 | their identities, their home directories, the groups they |
| 232 | belong to, and their default shell. Note that the user |
| 233 | passwords are <SPAN |
| 234 | CLASS="emphasis" |
| 235 | ><I |
| 236 | CLASS="EMPHASIS" |
| 237 | >not</I |
| 238 | ></SPAN |
| 239 | > |
| 240 | stored in this file, |
| 241 | <A |
| 242 | NAME="AEN23937" |
| 243 | HREF="#FTN.AEN23937" |
| 244 | >[2]</A |
| 245 | > |
| 246 | but in <TT |
| 247 | CLASS="FILENAME" |
| 248 | >/etc/shadow</TT |
| 249 | > in encrypted form.</P |
| 250 | ></DD |
| 251 | ></DL |
| 252 | ></DIV |
| 253 | ><DIV |
| 254 | CLASS="VARIABLELIST" |
| 255 | ><P |
| 256 | ><B |
| 257 | ><A |
| 258 | NAME="SYSCONFREF1" |
| 259 | ></A |
| 260 | >system configuration files</B |
| 261 | ></P |
| 262 | ><DL |
| 263 | ><DT |
| 264 | ><TT |
| 265 | CLASS="FILENAME" |
| 266 | >/etc/sysconfig/hwconf</TT |
| 267 | ></DT |
| 268 | ><DD |
| 269 | ><P |
| 270 | >Listing and description of attached hardware devices. |
| 271 | This information is in text form and can be extracted and |
| 272 | parsed.</P |
| 273 | ><P |
| 274 | ><TABLE |
| 275 | BORDER="0" |
| 276 | BGCOLOR="#E0E0E0" |
| 277 | WIDTH="90%" |
| 278 | ><TR |
| 279 | ><TD |
| 280 | ><PRE |
| 281 | CLASS="SCREEN" |
| 282 | > <TT |
| 283 | CLASS="PROMPT" |
| 284 | >bash$ </TT |
| 285 | ><TT |
| 286 | CLASS="USERINPUT" |
| 287 | ><B |
| 288 | >grep -A 5 AUDIO /etc/sysconfig/hwconf</B |
| 289 | ></TT |
| 290 | > |
| 291 | <TT |
| 292 | CLASS="COMPUTEROUTPUT" |
| 293 | >class: AUDIO |
| 294 | bus: PCI |
| 295 | detached: 0 |
| 296 | driver: snd-intel8x0 |
| 297 | desc: "Intel Corporation 82801CA/CAM AC'97 Audio Controller" |
| 298 | vendorId: 8086</TT |
| 299 | > |
| 300 | </PRE |
| 301 | ></TD |
| 302 | ></TR |
| 303 | ></TABLE |
| 304 | ></P |
| 305 | ><DIV |
| 306 | CLASS="NOTE" |
| 307 | ><TABLE |
| 308 | CLASS="NOTE" |
| 309 | WIDTH="90%" |
| 310 | BORDER="0" |
| 311 | ><TR |
| 312 | ><TD |
| 313 | WIDTH="25" |
| 314 | ALIGN="CENTER" |
| 315 | VALIGN="TOP" |
| 316 | ><IMG |
| 317 | SRC="common/note.png" |
| 318 | HSPACE="5" |
| 319 | ALT="Note"></TD |
| 320 | ><TD |
| 321 | ALIGN="LEFT" |
| 322 | VALIGN="TOP" |
| 323 | ><P |
| 324 | >This file is present on Red Hat and Fedora Core |
| 325 | installations, but may be missing from other |
| 326 | distros.</P |
| 327 | ></TD |
| 328 | ></TR |
| 329 | ></TABLE |
| 330 | ></DIV |
| 331 | ></DD |
| 332 | ></DL |
| 333 | ></DIV |
| 334 | ></DIV |
| 335 | ><H3 |
| 336 | CLASS="FOOTNOTES" |
| 337 | >Notes</H3 |
| 338 | ><TABLE |
| 339 | BORDER="0" |
| 340 | CLASS="FOOTNOTES" |
| 341 | WIDTH="100%" |
| 342 | ><TR |
| 343 | ><TD |
| 344 | ALIGN="LEFT" |
| 345 | VALIGN="TOP" |
| 346 | WIDTH="5%" |
| 347 | ><A |
| 348 | NAME="FTN.AEN23892" |
| 349 | HREF="files.html#AEN23892" |
| 350 | >[1]</A |
| 351 | ></TD |
| 352 | ><TD |
| 353 | ALIGN="LEFT" |
| 354 | VALIGN="TOP" |
| 355 | WIDTH="95%" |
| 356 | ><P |
| 357 | >This does not apply to <B |
| 358 | CLASS="COMMAND" |
| 359 | >csh</B |
| 360 | >, |
| 361 | <B |
| 362 | CLASS="COMMAND" |
| 363 | >tcsh</B |
| 364 | >, and other shells not related to or |
| 365 | descended from the classic Bourne shell |
| 366 | (<B |
| 367 | CLASS="COMMAND" |
| 368 | >sh</B |
| 369 | >).</P |
| 370 | ></TD |
| 371 | ></TR |
| 372 | ><TR |
| 373 | ><TD |
| 374 | ALIGN="LEFT" |
| 375 | VALIGN="TOP" |
| 376 | WIDTH="5%" |
| 377 | ><A |
| 378 | NAME="FTN.AEN23937" |
| 379 | HREF="files.html#AEN23937" |
| 380 | >[2]</A |
| 381 | ></TD |
| 382 | ><TD |
| 383 | ALIGN="LEFT" |
| 384 | VALIGN="TOP" |
| 385 | WIDTH="95%" |
| 386 | ><P |
| 387 | >In older versions of UNIX, passwords |
| 388 | <SPAN |
| 389 | CLASS="emphasis" |
| 390 | ><I |
| 391 | CLASS="EMPHASIS" |
| 392 | >were</I |
| 393 | ></SPAN |
| 394 | > stored in |
| 395 | <TT |
| 396 | CLASS="FILENAME" |
| 397 | >/etc/passwd</TT |
| 398 | >, and that explains |
| 399 | the name of the file.</P |
| 400 | ></TD |
| 401 | ></TR |
| 402 | ></TABLE |
| 403 | ><DIV |
| 404 | CLASS="NAVFOOTER" |
| 405 | ><HR |
| 406 | ALIGN="LEFT" |
| 407 | WIDTH="100%"><TABLE |
| 408 | SUMMARY="Footer navigation table" |
| 409 | WIDTH="100%" |
| 410 | BORDER="0" |
| 411 | CELLPADDING="0" |
| 412 | CELLSPACING="0" |
| 413 | ><TR |
| 414 | ><TD |
| 415 | WIDTH="33%" |
| 416 | ALIGN="left" |
| 417 | VALIGN="top" |
| 418 | ><A |
| 419 | HREF="bash-options.html" |
| 420 | ACCESSKEY="P" |
| 421 | >Prev</A |
| 422 | ></TD |
| 423 | ><TD |
| 424 | WIDTH="34%" |
| 425 | ALIGN="center" |
| 426 | VALIGN="top" |
| 427 | ><A |
| 428 | HREF="index.html" |
| 429 | ACCESSKEY="H" |
| 430 | >Home</A |
| 431 | ></TD |
| 432 | ><TD |
| 433 | WIDTH="33%" |
| 434 | ALIGN="right" |
| 435 | VALIGN="top" |
| 436 | ><A |
| 437 | HREF="systemdirs.html" |
| 438 | ACCESSKEY="N" |
| 439 | >Next</A |
| 440 | ></TD |
| 441 | ></TR |
| 442 | ><TR |
| 443 | ><TD |
| 444 | WIDTH="33%" |
| 445 | ALIGN="left" |
| 446 | VALIGN="top" |
| 447 | >Bash Command-Line Options</TD |
| 448 | ><TD |
| 449 | WIDTH="34%" |
| 450 | ALIGN="center" |
| 451 | VALIGN="top" |
| 452 | > </TD |
| 453 | ><TD |
| 454 | WIDTH="33%" |
| 455 | ALIGN="right" |
| 456 | VALIGN="top" |
| 457 | >Important System Directories</TD |
| 458 | ></TR |
| 459 | ></TABLE |
| 460 | ></DIV |
| 461 | ></BODY |
| 462 | ></HTML |
| 463 | > |