Each type of Unix has its own specification for a standard file system structure. This defines which directories belong where in the directory tree and what types of files and services belong in each directory.
The first and primary directory is the "root" directory identified as "/". Under this directory all others exist. Common first-level directories in the root directory are /etc, /bin, /sbin, /tmp, /home, /var, /lib, /dev, /boot, /mnt, /proc, and /root. Other directories may or may not exist here, but these are usually essential.
Unlike DOS and similar filesystem structures, Unix files are located according to their type and function. Binary files are usually placed in one of the many /bin directories. The /sbin directory usually contains files reserved for the superuser for system maintenance utilities. The /lib directories contain libraries shared by various classes of programs and processes. Library directories are located within other directory trees too--as are /tmp, /doc, and /etc directories--so they are as segregated executable programs on a system.
The /boot directory often contains the kernel image in a Unix system, as well as the system map and various mounting and partition information for different file system types. The /mnt directory contains the "mount points" of external file systems you may wish to access, such as floppy drives, CD-ROMs, Zip drives, or whatever. These mount points are symbolic links to mounted file systems.
The /home directory contains the home directories of system users labelled by their login names. The /root directory is the superuser's home directory. The /usr directory contains a host of applications and documentation directories for use primarily by users. Windowing environment configuration and executable files normally go here also, /usr/X11 for example. You'll also find the "man pages" and documentation files for the programs you use in the /usr directory tree.
/var, /tmp, and /etc are directories that contain system information that is either variable, temporary, or otherwise defined. /var contains logs, spools, file and device locks, and similar information. Temporary files created by processes often go in /tmp or in a /tmp directory somewhere in the directory tree.
Directories like /lib, /var, /doc, /etc exist throughout the directory tree. Their locations are often fixed, and all programs must be able to find them in their proper location.
Copies of the Linux FSSTND exist several places on the Internet. Search for "Linux FSSTND" using your favorite search engine.
When you boot Linux, the kernel loads into memory. You can watch the messages scroll across your display and follow along as the drivers get loaded into memory. After loading the drivers, the mother of all processes runs: INIT.
init is found in /etc, /bin, or usually /sbin/init on many systems. This process starts new processes and controls the entire system start up process through "runlevels" as defined in the /etc/inittab file. A runlevel is the state a system is in, for example: single user mode, multi-user mode, multi-user mode with NFS (network file system) activated, X11 Window manager active, halt, reboot, and so on. These run levels typically are each assigned a number or letter. On my system, runlevel 1 is single user mode while 3 is full multiuser mode.
If you can read you inittab file on your system, you'll see lines with the following syntax:
code:runlevel:action:command
The inittab file tells the system what to do as it comes to life. You could see something like the following, for example:
---snip---
#System initialization
si::sysinit:/etc/rc.d/rc.sysinit
l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
---snip---
This part of a sample inittab file tells the system which scripts to run for each runlevel. As the system advances through runlevels different scripts and processes are started.
The inittab file also defines what the system does when CTL-ALT-DEL are pressed simultaneously. A Unix filesystem is much more complex than a DOS FAT filesystem. All processes must be shutdown in the order of their respective runlevels. You can't just reboot anytime like you could with DOS. The inittab file will probably also define what happens if the power goes out accidentally or if there's a UPS for the system.
The example above shows the startup scripts in /etc/rc.d. They might be elsewhere on your system, but if you look at them they will tell you about your own startup processes, when different daemons (system-related programs) are started and in what sequence.
The startup process is very involved. For more detailed information, I recommend Chapter 4 of the System Administrator's Guide, part of the Linux Documentation Project at http://www.sunsite.edu/LDP. This chapter covers system boots and shutdowns. Chapter 6 of the same guide covers the FSSTND we talked about above.
© David S. Jackson, 1997.