init的进程号是1,从这一点就能看出,init进程是系统所有进程的起点,linux在完成核内引导以后,就开始运行init程序,。init程序 需要读取配置文件/etc/inittab。inittab是一个不可执行的文本文件,它有若干行指令所组成。在redhat系统中,inittab的内容如下所示(以“###"开始的中注释为笔者增加的): 【扩展信息:在回到从前】
# # inittab this file describes how the init process should set up # the system in a certain run-level. # # author: miquel van smoorenburg, 〈miquels@drinkel.nl.mugnet.org〉 # modified for rhs linux by marc ewing and donnie barnes # # default runlevel. the runlevels used by rhs are: # 0 - halt (do not set initdefault to this) # 1 - single user mode # 2 - multiuser, without nfs (the same as 3, if you do not havenetworking) # 3 - full multiuser mode # 4 - unused # 5 - x11 # 6 - reboot (do not set initdefault to this) # ###表示当前缺省运行级别为5(initdefault); id:5:initdefault: ###启动时自动执行/etc/rc.d/rc.sysinit脚本(sysinit) # 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 ... 下一页