linuxÎÞ·¨shutdownÔõô½â¾ö
linuxÎÞ·¨shutdown½â¾öÒªÁ죺1¡¢»ñÈ¡×ã¹»µÄȨÏÞ²¢Ê¹ÓÃsudoÏÂÁîÒÔÖÎÀíÔ±Éí·ÝÔËÐйػúÏÂÁ2¡¢¼ì²éÊÇ·ñÓÐÆäËûÓû§µÇ¼µ½ÏµÍ³ÉÏ£¬²¢ÒªÇóÍ˳ö»ò×¢Ïú£»3¡¢×èÖ¹¿ÉÄÜ×ÌÈŹػúµÄÔËÐÐÖÐÀú³Ì»òЧÀÍ£»4¡¢Ê¹ÓÃpsÏÂÁîÉó²éÀú³Ì£¬²¢Ê¹ÓÃkillÏÂÁî×èÖ¹£»5¡¢ÔËÐÐÎļþϵͳ¼ì²é¹¤¾ß fsck À´É¨ÃèºÍÐÞ¸´Îļþϵͳ¹ýʧ£»6¡¢¼ì²éÓ²¼þ×°±¸ÊÇ·ñÕý³£ÔË×÷£»7¡¢ÔÚÇå½àµÄÆô¶¯ÇéÐÎÖоÙÐйػú¡£
±¾½Ì³Ì²Ù×÷ϵͳ£ºLinux5.18.14ϵͳ¡¢Dell G3µçÄÔ¡£
ÔÚ Linux ϵͳÖÐÎÞ·¨Õý³£¹Ø»ú£¨shutdown£©£¬¿ÉÄÜÓжàÖÖÔµ¹ÊÔÓɵ¼Ö¡£ÒÔÏÂÊÇһЩ³£¼ûµÄÔµ¹ÊÔÓÉÏ¢Õù¾öÒªÁ죺
ȨÏÞÎÊÌ⣺ȷ±£Äã¾ßÓÐ×ã¹»µÄȨÏÞÀ´Ö´Ðйػú²Ù×÷¡£Í¨³££¬Ö»ÓÐ root Óû§»ò¾ßÓйػúȨÏÞµÄÓû§²Å»ªÖ´ÐйػúÏÂÁî¡£Äã¿ÉÒÔʵÑéʹÓà sudo ÏÂÁîÒÔÖÎÀíÔ±Éí·ÝÔËÐйػúÏÂÁî¡£
ÆäËûÓû§µÇ¼ÎÊÌ⣺ÈôÊÇÓÐÆäËûÓû§µÇ¼µ½ÏµÍ³ÉÏ£¬ÏµÍ³¿ÉÄÜÎÞ·¨Õý³£¹Ø»ú¡£¿ÉÒÔ¼ì²éÄ¿½ñµÇ¼µÄÓû§²¢ÊµÑéÒªÇóËûÃÇÍ˳ö»ò×¢Ïú¡£
ÔËÐÐÖеÄÀú³Ì»òЧÀÍÎÊÌ⣺ijЩÔËÐÐÖеÄÀú³Ì»òЧÀÍ¿ÉÄÜ»á×èֹϵͳ¹Ø»ú¡£Äã¿ÉÒÔʵÑéÊÖ¶¯×èÖ¹ÕâЩÀú³Ì»òЧÀÍ£¬²¢ÔÙ´ÎʵÑé¹Ø»ú¡£Ê¹Óà ps ÏÂÁîÉó²éÔËÐÐÖеÄÀú³Ì£¬²¢Ê¹Óà kill ÏÂÁî×èÖ¹ËüÃÇ¡£
ÎļþϵͳÎÊÌ⣺ÈôÊÇÎļþϵͳ±£´æ¹ýʧ»òË𻵣¬¿ÉÄܻᵼÖÂϵͳÎÞ·¨Õý³£¹Ø»ú¡£ÔËÐÐÎļþϵͳ¼ì²é¹¤¾ßÀýÈç fsck À´É¨ÃèºÍÐÞ¸´Îļþϵͳ¹ýʧ¡£
Ó²¼þÎÊÌ⣺ÓÐʱ£¬Ó²¼þÎÊÌ⣬ÈçµçÔ´¹©Ó¦È±·¦¡¢¹ÊÕÏÓ²¼þµÈ£¬¿ÉÄܵ¼ÖÂϵͳÎÞ·¨ÍêÈ«¹Ø»ú¡£È·±£Ó²¼þ×°±¸Õý³£ÔË×÷£¬²¢¼ì²éÊÇ·ñÓÐÏà¹ØÓ²¼þ¹ýʧ±¨¸æ¡£
ÆäËûÈí¼þÎÊÌ⣺ijЩÈí¼þ¿ÉÄÜ»á×ÌÈÅϵͳ¹Ø»ú¡£ÊµÑéÔÚÇå½àµÄÆô¶¯ÇéÐÎÖоÙÐйػú£¬ÒÔÈ·¶¨ÊÇ·ñ±£´æÈí¼þ³åÍ»¡£
ÈôÊÇÓöµ½ÎÞ·¨¹Ø»úµÄÎÊÌ⣬¿ÉÒÔʵÑéÒÔϽâ¾öÒªÁ죺
È·±£Äã¾ßÓÐ×ã¹»µÄȨÏÞÀ´Ö´Ðйػú²Ù×÷£¬²¢Ê¹Óà sudo ÏÂÁîÒÔÖÎÀíÔ±Éí·ÝÔËÐйػúÏÂÁî¡£
¼ì²éÊÇ·ñÓÐÆäËûÓû§µÇ¼µ½ÏµÍ³ÉÏ£¬²¢ÒªÇóËûÃÇÍ˳ö»ò×¢Ïú¡£
×èÖ¹¿ÉÄÜ×ÌÈŹػúµÄÔËÐÐÖÐÀú³Ì»òЧÀÍ¡£
ʹÓà ps ÏÂÁîÉó²éÀú³Ì£¬²¢Ê¹Óà kill ÏÂÁî×èÖ¹ËüÃÇ¡£
ÔËÐÐÎļþϵͳ¼ì²é¹¤¾ß fsck À´É¨ÃèºÍÐÞ¸´Îļþϵͳ¹ýʧ¡£
¼ì²éÓ²¼þ×°±¸ÊÇ·ñÕý³£ÔË×÷£¬²¢É¨³ýÓ²¼þ¹ýʧ¡£
ÔÚÇå½àµÄÆô¶¯ÇéÐÎÖоÙÐйػú£¬ÒÔɨ³ýÈí¼þ³åÍ»¡£
ÈôÊÇÒÔÉÏÒªÁìÎÞ·¨½â¾öÎÊÌ⣬½¨ÒéÌṩ¸ü¶àÏêϸÐÅÏ¢£¬Èç¹ýʧÐÂÎÅ¡¢Ïêϸ²Ù×÷°ì·¨ºÍʹÓÃµÄ Linux ¿¯ÐаæµÈ£¬ÒÔ±ã¸üºÃµØ×ÊÖúÄã½â¾öÎÊÌâ¡£
ÒÔÉϾÍÊÇlinuxÎÞ·¨shutdownÔõô½â¾öµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡