Init

First the init program opens it's config file "/etc/inittab". Lets have a look at it (open /etc/inittab here). The first non-commented line in my inittab specifies the default runlevel. Unix runlevels are used to represent the state of the machine at a given time along with what services are available in the given state. A short description of each is below:

On a related note, if you have permission (root), you can change the runlevel of your machine by executing init with the runlevel as a parameter. For instance, "init 6" will reboot your machine. Next the inittab tells init to do some things like setting up some system-wide evironment variables like "PATH, RUNLEVEL, etc..", do some system-wide checks, specify what to do in each runlevel, etc. I won't go into the specifics here because these are usually distro specific. The inittab usually has entries to specify what to do when certain events are recieved such as: "ctrlaltdel, powerwait, powerfailnow, powerokwait, etc.." Next inittab specifies to run some instances of a program called getty. getty is the program that provides the text login screen. getty gets it's name from a tty, which has many explanations for it's acronym, but is basically a text terminal. The getty entries look like this:
1:2345:respawn:/sbin/getty/ 38400 tty1
The first field matches the tty number by tradition, but is supposed to be the execution order for the init program (not important). The next field specifies which runlevels to execute this program in. The next field specifies the action to be taken by this entry, which in our case is respawn. This means, execute the program we specifiy and when it exits, just start the program again indefinitely. The next parameter is the actual program and its parameters. Our program in this case is getty and we specify the baud rate (38400) and port (tty1). This is significant because (as the next couple of commented entries in inittab show) you can use getty to listen to a serial port as well. The next commented entry also shows that you can use a program called mgetty, which knows how to speak to modems, to allow text login via a modem for a dialup user. (try to login to machine with palm pilot here).