ลินุกส์ Init run levels

The idea behind operating different services at different run levels essentially revolves around the fact that different systems can be used in different ways. Some services cannot be used until the system is in a particular state, or mode, such as being ready for more than one user or having networking available. There are times in which you may want to operate the system in a lower mode. Examples are fixing disk corruption problems in run level 1 so no other users can possibly be on the system, or leaving a server in run level 3 without an X session running. In these cases, running services that depend upon a higher system mode to function does not make sense because they will not work correctly anyway. By already having each service assigned to start when its particular run level is reached, you ensure an orderly start up process, and you can quickly change the mode of the machine without worrying about which services to manually start or stop. Available run levels are generally described in /etc/inittab, which is partially shown below:
# inittab This file describes how the INIT process should set up
# the system in a certain run−level.
# Default runlevel. The runlevels 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:5:initdefault: