|
| 1 | +#lang pollen |
| 2 | + |
| 3 | +◊page-init{} |
| 4 | +◊define-meta[page-title]{Important Files} |
| 5 | +◊define-meta[page-description]{Important Files and Folders} |
| 6 | + |
| 7 | +◊section{Important Files} |
| 8 | + |
| 9 | +◊definition-block[#:type "code"]{ |
| 10 | + |
| 11 | +◊definition-entry[#:name "/etc/profile"]{ |
| 12 | +Systemwide defaults, mostly setting the environment (all Bourne-type |
| 13 | +shells, not just Bash ◊footnote{This does not apply to ◊command{csh}, |
| 14 | +◊command{tcsh}, and other shells not related to or descended from the |
| 15 | +classic Bourne shell (◊command{sh}).}) |
| 16 | + |
| 17 | +} |
| 18 | + |
| 19 | +◊definition-entry[#:name "/etc/bashrc"]{ |
| 20 | +Systemwide functions and aliases for Bash |
| 21 | + |
| 22 | +} |
| 23 | + |
| 24 | +◊definition-entry[#:name "$HOME/.bash_profile"]{ |
| 25 | +User-specific Bash environmental default settings, found in each |
| 26 | +user's home directory (the local counterpart to ◊fname{/etc/profile}) |
| 27 | + |
| 28 | +} |
| 29 | + |
| 30 | +◊definition-entry[#:name "$HOME/.bashrc"]{ |
| 31 | +User-specific Bash init file, found in each user's home directory (the |
| 32 | +local counterpart to ◊fname{/etc/bashrc}). Only interactive shells and |
| 33 | +user scripts read this file. See TODO Appendix M for a sample |
| 34 | +◊fname{.bashrc} file. |
| 35 | + |
| 36 | +} |
| 37 | + |
| 38 | +◊definition-entry[#:name "$HOME/.bash_logout"]{ |
| 39 | +User-specific instruction file, found in each user's home |
| 40 | +directory. Upon exit from a login (Bash) shell, the commands in this |
| 41 | +file execute. |
| 42 | + |
| 43 | +} |
| 44 | + |
| 45 | +◊definition-entry[#:name "/etc/passwd"]{ |
| 46 | +A listing of all the user accounts on the system, their identities, |
| 47 | +their home directories, the groups they belong to, and their default |
| 48 | +shell. Note that the user passwords are not stored in this file, but |
| 49 | +in ◊fname{/etc/shadow} in encrypted form. ◊footnote{In older versions |
| 50 | +of UNIX, passwords were stored in ◊fname{/etc/passwd}, and that |
| 51 | +explains the name of the file.} |
| 52 | + |
| 53 | +} |
| 54 | + |
| 55 | +◊definition-entry[#:name "/etc/sysconfig/hwconf"]{ |
| 56 | +Listing and description of attached hardware devices. This information |
| 57 | +is in text form and can be extracted and parsed. |
| 58 | + |
| 59 | +◊example{ |
| 60 | +bash$ grep -A 5 AUDIO /etc/sysconfig/hwconf |
| 61 | +class: AUDIO |
| 62 | +bus: PCI |
| 63 | +detached: 0 |
| 64 | +driver: snd-intel8x0 |
| 65 | +desc: "Intel Corporation 82801CA/CAM AC'97 Audio Controller" |
| 66 | +vendorId: 8086 |
| 67 | +} |
| 68 | + |
| 69 | +Note: This file is present on Red Hat and Fedora Core installations, |
| 70 | +but may be missing from other distros. |
| 71 | + |
| 72 | +} |
| 73 | + |
| 74 | +} |
| 75 | + |
| 76 | +◊section{Important System Directories} |
| 77 | + |
| 78 | +Sysadmins and anyone else writing administrative scripts should be |
| 79 | +intimately familiar with the following system directories. |
| 80 | + |
| 81 | +◊definition-block[#:type "code"]{ |
| 82 | + |
| 83 | +◊definition-entry[#:name "/bin"]{ |
| 84 | +Binaries (executables). Basic system programs and utilities (such as |
| 85 | +◊command{bash}). |
| 86 | + |
| 87 | +} |
| 88 | + |
| 89 | +◊definition-entry[#:name "/usr/bin"]{ |
| 90 | +More system binaries. ◊footnote{Some early UNIX systems had a fast, |
| 91 | +small-capacity fixed disk (containing ◊fname{/}, the root partition), and a |
| 92 | +second drive which was larger, but slower (containing ◊fname{/usr} and other |
| 93 | +partitions). The most frequently used programs and utilities therefore |
| 94 | +resided on the small-but-fast drive, in ◊fname{/bin}, and the others on the |
| 95 | +slower drive, in ◊fname{/usr/bin}. |
| 96 | + |
| 97 | +This likewise accounts for the split between ◊fname{/sbin} and |
| 98 | +◊fname{/usr/sbin}, ◊fname{/lib} and ◊fname{/usr/lib}, etc.} |
| 99 | + |
| 100 | +} |
| 101 | + |
| 102 | +◊definition-entry[#:name "/usr/local/bin"]{ |
| 103 | +Miscellaneous binaries local to the particular machine. |
| 104 | + |
| 105 | +} |
| 106 | + |
| 107 | +◊definition-entry[#:name "/sbin"]{ |
| 108 | +System binaries. Basic system administrative programs and utilities |
| 109 | +(such as ◊command{fsck}). |
| 110 | + |
| 111 | +} |
| 112 | + |
| 113 | +◊definition-entry[#:name "/etc"]{ |
| 114 | +Et cetera. Systemwide configuration scripts. |
| 115 | + |
| 116 | +Of particular interest are the ◊fname{/etc/fstab} (filesystem table), |
| 117 | +◊fname{/etc/mtab} (mounted filesystem table), and the |
| 118 | +◊fname{/etc/inittab} files. |
| 119 | + |
| 120 | +} |
| 121 | + |
| 122 | +◊definition-entry[#:name "/etc/rc.d"]{ |
| 123 | +Boot scripts, on Red Hat and derivative distributions of Linux. |
| 124 | + |
| 125 | +} |
| 126 | + |
| 127 | +◊definition-entry[#:name "/usr/share/doc"]{ |
| 128 | +Documentation for installed packages. |
| 129 | + |
| 130 | +} |
| 131 | + |
| 132 | +◊definition-entry[#:name "/usr/man"]{ |
| 133 | +The systemwide manpages. |
| 134 | + |
| 135 | +} |
| 136 | + |
| 137 | +◊definition-entry[#:name "/dev"]{ |
| 138 | +Device directory. Entries (but not mount points) for physical and |
| 139 | +virtual devices. See TODO Chapter 29. |
| 140 | + |
| 141 | +} |
| 142 | + |
| 143 | +◊definition-entry[#:name "/proc"]{ |
| 144 | +Process directory. Contains information and statistics about running |
| 145 | +processes and kernel parameters. See TODO Chapter 29. |
| 146 | + |
| 147 | +} |
| 148 | + |
| 149 | +◊definition-entry[#:name "/sys"]{ |
| 150 | +Systemwide device directory. Contains information and statistics about |
| 151 | +device and device names. This is newly added to Linux with the 2.6.X |
| 152 | +kernels. |
| 153 | + |
| 154 | +} |
| 155 | + |
| 156 | +◊definition-entry[#:name "/mnt"]{ |
| 157 | +Mount. |
| 158 | + |
| 159 | +Directory for mounting hard drive partitions, such as |
| 160 | +◊fname{/mnt/dos}, and physical devices. In newer Linux distros, the |
| 161 | +◊fname{/media} directory has taken over as the preferred mount point |
| 162 | +for I/O devices. |
| 163 | + |
| 164 | +} |
| 165 | + |
| 166 | +◊definition-entry[#:name "/media"]{ |
| 167 | +In newer Linux distros, the preferred mount point for I/O devices, |
| 168 | +such as CD/DVD drives or USB flash drives. |
| 169 | + |
| 170 | +} |
| 171 | + |
| 172 | +◊definition-entry[#:name "/var"]{ |
| 173 | +Variable (changeable) system files. |
| 174 | + |
| 175 | +This is a catchall "scratchpad" directory for data generated while a |
| 176 | +Linux/UNIX machine is running. |
| 177 | + |
| 178 | +} |
| 179 | + |
| 180 | +◊definition-entry[#:name "/var/log"]{ |
| 181 | +Systemwide log files. |
| 182 | + |
| 183 | +} |
| 184 | + |
| 185 | +◊definition-entry[#:name "/var/spool/mail"]{ |
| 186 | +User mail spool. |
| 187 | + |
| 188 | +} |
| 189 | + |
| 190 | +◊definition-entry[#:name "/lib"]{ |
| 191 | +Systemwide library files. |
| 192 | + |
| 193 | +} |
| 194 | + |
| 195 | +◊definition-entry[#:name "/usr/lib"]{ |
| 196 | +More systemwide library files. |
| 197 | + |
| 198 | +} |
| 199 | + |
| 200 | +◊definition-entry[#:name "/tmp"]{ |
| 201 | +System temporary files. All files here are deleted at boot time. |
| 202 | + |
| 203 | +} |
| 204 | + |
| 205 | +◊definition-entry[#:name "/boot"]{ |
| 206 | +System boot directory. |
| 207 | + |
| 208 | +The kernel, module links, system map, and boot manager reside here. |
| 209 | + |
| 210 | +Warning: Altering files in this directory may result in an unbootable |
| 211 | +system. |
| 212 | + |
| 213 | +} |
| 214 | + |
| 215 | +} |
0 commit comments