Being able to find, view, and edit files isn't that useful if you can't find what you're looking for. Even though there are minor differences between the filesystem layouts on different Unix systems (Figures 1.51.8), the general layout is pretty similar. If there's an important difference that affects one of the topics we'll be looking at later, I'll describe each platform specifically so that you'll always be able to find what you need. Figure 1.6. FreeBSD 5.3's / directory. / The root of the filesystem tree; all other directories and files are created at some point under the root. /bin Standard system programs (binaries in Unix speak). /boot Files used during boot, such as the kernel image. Figure 1.7. Cygwin's / directory.
/dev System devices. Every piece of hardware in the system has an entry here, but there will also be many entries that don't correspond to actual hardware, such as /dev/random. /etc Systemconfiguration files. On Mac OS X, much of the information traditionally stored in /etc is actually maintained by the NetInfo database. Figure 1.8. Fink's / directory.
/home Home directories for user accounts. This is replaced by /Users on Mac OS X systems. /lib Shared libraries and data files for standard system binaries. /lost+found A directory created by the filesystem checker (fsck). If any files or directories are "lost" during a system crash, fsck will move them here. /mnt Mount points for network filesystems and removable devices, such as CD-ROMs. The Mac OS X equivalent is the /Volumes directory. /opt Commercial applications and optional software that could also be installed in /usr/local. /proc Process filesystem. The entries in here represent the running programs on the system, shared memory blocks, and so on. /root The home directory for the root account. /sbin Important system binaries that are necessary for system-administration tasks. /tmp A garbage dump for temporary files and directories. On some systems, /tmp is removed and created fresh during every system reboot. /usr Additional binaries and its own /bin, /etc, and /lib directories to support the additional binaries stored here. /usr/local An area for local system applications (useful things that weren't included in the main operating-system distribution) and data. Like /usr, it usually has its own /bin, /etc, and /lib directories. /var System logs, printer spools, and other files that tend to change a lot. Figure 1.5. Fedora Core 3's / directory. |