


/dev directory.
A ps -ef listing on each OS shows what these processes are:
HP-UX 10.20:
UID PID PPID C STIME TTY TIME COMMAND root 0 0 0 Apr 20 ? 0:17 swapper root 1 0 0 Apr 20 ? 0:00 init root 2 0 0 Apr 20 ? 1:02 vhand* swapper - dummy process which provides swapping services
Linux RedHat 6.0:
UID PID PPID C STIME TTY TIME CMD root 1 0 0 09:59 ? 00:00:07 init root 2 1 0 09:59 ? 00:00:00 [kflushd] root 3 1 0 09:59 ? 00:00:00 [kpiod] root 4 1 0 09:59 ? 00:00:00 [kswapd] root 5 1 0 10:00 ? 00:00:00 [mdrecoveryd]* kflushd - dummy process to handle the swapping activity
init Commandinit command.
init command (usually found in /sbin or /usr/sbin)
For example, under Linux RedHat 6.0, the default convention is:
0 - Halt 1 - Single user mode 2 - Multiuser, without NFS (The same as 3, if you do not have networking) 3 - Full multiuser mode 4 - unused 5 - X11 (run a graphical login window) 6 - Reboot
So, for example, running "init 6" as root under Linux will reboot the system.
The set of processes which are allowed to exist under a certain run level
are started by init during the boot sequence via the /etc/inittab file.
/etc/inittab:/etc/inittab that tells init how to start the processes
/etc/inittab (from a system running
Linux RedHat 6.0):################################################################################ # # inittab for Linux # id:5:initdefault: # 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 # Things to run in every runlevel. ud::once:/sbin/update # Trap CTRL-ALT-DELETE ca::ctrlaltdel:/sbin/shutdown -t3 -r now # Run gettys 1:2345:respawn:/sbin/mingetty tty1 2:2345:respawn:/sbin/mingetty tty2 3:2345:respawn:/sbin/mingetty tty3 4:2345:respawn:/sbin/mingetty tty4 5:2345:respawn:/sbin/mingetty tty5 6:2345:respawn:/sbin/mingetty tty6 # Run xdm in runlevel 5 # xdm is now a separate service x:5:respawn:/etc/X11/prefdm -nodaemon #################################################################################
The general format of this file is id:runlevels:action:process
inittab entry
/etc/rc.d
Here is a directory listing for /etc/rc.d/rc3.d under
Linux RedHat 6.0 (remember, run level 3 is the multiuser mode in Linux):
./ K20rwalld@ K50snmpd@ S11portmap@ S80sendmail@ ../ K20rwhod@ K55routed@ S20random@ S85gpm@ K05innd@ K25squid@ K60mars-nwe@ S30syslog@ S90xfs@ K08autofs@ K28amd@ K75gated@ S40atd@ S93sshd@ K15httpd@ K30mcserv@ K80nscd@ S40crond@ S99linuxconf@ K15postgresql@ K34yppasswdd@ K85netfs@ S50inet@ S99local@ K15sound@ K35dhcpd@ K88ypserv@ S55xntpd@ K20bootparamd@ K35smb@ K96pcmcia@ S60lpd@ K20rstatd@ K45arpwatch@ S05apmd@ S60nfs@ K20rusersd@ K45named@ S10network@ S75keytable@