CentOS5.8:
# # inittab This file describes how the INIT process should set up # the system in a certain run-level.### ###该文件描述了INIT进程应设置系统在一定的运行级别。 # # 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 have networking) ###与3相似,只是没有NFS # 3 - Full multiuser mode ###完整含有网络的纯文本模式 # 4 – unused ###系统保留 # 5 - X11 ###与3类似,但加载使用X window # 6 - reboot (Do NOT set initdefault to this) ###重启 # id:3:initdefault: ###预设的runlevel,此runlevel为3 # System initialization. si::sysinit:/etc/rc.d/rc.sysinit ###准备系统软件执行的环境的脚本文档 ##7个不同的服务,需要启动服务的scripts的放置路径 l0:0:wait:/etc/rc.d/rc 0 0 在/etc/rc.d/rc0.d/ l1:1:wait:/etc/rc.d/rc 1 1 在/etc/rc.d/rc1.d/ l2:2:wait:/etc/rc.d/rc 2 2 在/etc/rc.d/rc2.d/ l3:3:wait:/etc/rc.d/rc 3 3 在/etc/rc.d/rc3.d/ l4:4:wait:/etc/rc.d/rc 4 4 在/etc/rc.d/rc4.d/ l5:5:wait:/etc/rc.d/rc 5 5 在/etc/rc.d/rc5.d/ l6:6:wait:/etc/rc.d/rc 6 6 在/etc/rc.d/rc6.d # Trap CTRL-ALT-DELETE ###是否允许按下ctrl+alt+del就重新启动的设定项目 ca::ctrlaltdel:/sbin/shutdown -t3 -r now # When our UPS tells us power has failed, assume we have a few minutes # of power left. Schedule a shutdown for 2 minutes from now. ###当ups电源电量低时,假设还有几分钟的时间。现在做一个两分钟内关机的计划。 # This does, of course, assume you have powerd installed and your # UPS connected and working correctly. ###假设电源正常 pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down" ###没电,关机 # If power was restored before the shutdown kicked in, cancel it. ###如果在关机前电源恢复,则取消关机。 pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled" ####tty1~tty6是由底下这6行决定的 # Run gettys in standard runlevels ###在标准运行级别运行的getty 1:2345:respawn:/sbin/mingetty tty1 ###respawn 复位 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 ###此处决定X window # Run xdm in runlevel 5 x:6:respawn:/etc/X11/prefdm –nodaemon
CentOS 6.4
# inittab is only used by upstart for the default runlevel. # # ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM. # # System initialization is started by /etc/init/rcS.conf # # Individual runlevels are started by /etc/init/rc.conf # # Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf # # Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf, # with configuration in /etc/sysconfig/init. # # For information on how to write upstart event handlers, or how # upstart works, see init(5), init(8), and initctl(8). # # Default runlevel. The runlevels used 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 have networking) # 3 - Full multiuser mode # 4 - unused # 5 - X11 # 6 - reboot (Do NOT set initdefault to this) # id:3:initdefault: