through the various files.) To determine which jail
Chapter 9: Too Much Information About /etc Overview The /etc directory holds the basic configuration information needed to boot a UNIX system. Every time I encounter an unfamiliar UNIX, one of the first things I do is scope out /etc. The fastest way to go from a junior UNIX admin to a mid-grade one is to read /etc. Yes, all of it. Yes, this is a lot of reading. But understanding /etc means that you understand how the system hangs together. As you progress as a UNIX admin you’re going to pick up this information piecemeal anyway, so you might as well make it easy on yourself and assemble this portion of your toolkit at the beginning. Many /etc files are discussed in a chapter where they’re most relevant (such as /etc/services in Chapter 5. This chapter will cover the important files that don’t quite fit anywhere else. Varieties of /etc Files Different UNIX systems use different /etc files. In many cases, these files are simply renamed or restructured files from BSD4.3 or BSD4.4. The first time I encountered an IBM AIX box, for example, I went looking for a BSD-style /etc/fstab. It wasn’t there. But a little hunting led me to /etc/filesystems, which turned out to be an IBM-specific rearranged version of /etc/fstab. Knowing that the information existed somewhere in /etc, and knowing what files it obviously wasn’t in, made the search quite short. Even radically different FreeBSD systems have almost identical /etc directories. While some add-on programs insert their own files here, you can expect certain files to be on every FreeBSD system you encounter. Note Before you touch any /etc files, review the information on RCS (Revision Control System) in Chapter 3. I strongly recommend that you create an /etc/RCS directory and use it religiously when experimenting. Changes in /etc can completely disable your system. While recovering a system’s scrambled filesystem table can help turn a competent administrator into a good one, it’s one of the least pleasant ways to get there. Default Files The files in FreeBSD’s /etc/defaults/ directory each contain variable assignments. These files are not intended to be edited by the administrator; instead, they’re designed to be overridden by a file of the same name directly under /etc. For example, the upgrade process completely replaces the files in /etc/defaults. While every new version of FreeBSD has a slightly different default configuration, the developers go to great lengths to ensure that changes to these files are backward-compatible. This means that you won’t have to go through the upgraded configuration and manually merge in your changes; at most you’ll have to check out the new defaults file for nifty new configuration opportunities. 185
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Inexpensive Web Hosting services