ºìÁªLinuxÃÅ»§
Linux°ïÖú

linuxÖеÄrun-level

·¢²¼Ê±¼ä:2007-11-28 11:56:20À´Ô´:ºìÁª×÷Õß:lication
linux²Ù×÷ϵͳ×Ô´Ó¿ªÊ¼Æô¶¯ÖÁÆô¶¯Íê±ÏÐèÒª¾­Àú¼¸¸ö²»Í¬µÄ½×¶Î£¬Õ⼸¸ö½×¶Î¾Í½Ð×örunlevel£¬Í¬Ñù£¬µ±linux²Ù×÷ϵͳ¹Ø±ÕʱҲҪ¾­ÀúÁíÍ⼸¸ö²»Í¬µÄrunlevel£¬ÏÂÃæÎÒÃǾÍ×¼±¸Ïêϸ½éÉÜÒ»ÏÂrunlevel£¬²¢ÏòÄúչʾһЩС¼¼ÇÉÀ´ÈÃÄúµÄlinuxϵͳ±ÜÃâ²»±ØÒªµÄÖØÆô¶¯¡£

runlevel¿ÉÒÔÈÏΪÊÇϵͳ״̬£¬ÐÎÏóÒ»µã£¬Äú¿ÉÒÔÈÏΪrunlevelÓеãÏó΢ÈíµÄwindows²Ù×÷ϵͳÖеÄNormal£¬safemode£¬ºÍCommand prompt only¡£½øÈëÿ¸örunlevel¶¼ÐèÒªÆô¶¯»ò¹Ø±ÕÏàÓ¦µÄһϵÁзþÎñ(services)£¬ÕâЩ·þÎñ(services)ÒÔ³õʼ»¯½Å±¾µÄ·½Ê½·ÅÖÃÓÚĿ¼/etc/rc.d/rc?.d/»òÕß/etc/rc?.dÏÂÃæ(?´ú±írunlevelµÄ¶ÔÓ¦ÐòºÅ)¡£

ÔÚ´ó¶àÊýµÄlinux·¢Ðа汾ÖУ¬Í¨³£ÓÐ8¸örunlevel

Runlevel System State
0 Halt the system
1 Single user mode
2 Basic multi user mode
3 Multi user mode
5 Multi user mode with GUI
6 Reboot the system
S, s Single user mode

¶àÊýµÄ×ÀÃæµÄlinuxϵͳȱʡµÄrunlevelÊÇ5£¬Óû§µÇ½ʱÊÇͼÐνçÃ棬¶ø¶àÊýµÄ·þÎñÆ÷°æ±¾µÄlinuxϵͳȱʡµÄrunlevelÊÇ3£¬Óû§µÇ½ʱÊÇ×Ö·û½çÃ棬runlevel 1ºÍ2³ýÁ˵÷ÊÔÖ®ÍâºÜÉÙʹÓã¬runlevel sºÍS²¢²»ÊÇÖ±½Ó¸øÓû§Ê¹Ó㬶øÊÇÓÃÀ´ÎªSingle user mode×÷×¼±¸¡£

linuxµÄÔËÐÐģʽ±ÈÆðwindowsµÄÆô¶¯Ä£Ê½µÄÓÅÊÆÔÚÓÚ£ºÄã¿ÉÒÔÔÚϵͳ¿ÕÏÐʱʹÓÃ.init¹¤¾ßÇл»ÄãÏÖÔÚʹÓõÄrunlevel£¬ÁíÍ⣬µ±Äã¹Ø±Õ»òÕßÆô¶¯linuxϵͳʱÄãÒѾ­²»Öª²»¾õÖÐÇл»ÄãµÄrunlevel£¬ÏµÍ³¹Ø»ú½ø³ÌÐèÒªµ÷ÓÃrunlevel(0»ò6)À´¹Ø±ÕËùÓÐÕýÔÚÔËÐÐÖеĽø³Ì¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ