º£²ó¤Ï¡¢systemd¤Î½é´ü²½»þ´Ö¤òû½Ì¤¹¤ë¥Á¥å¡¼¥Ë¥ó¥°ÊýË¡¤ò²òÀ⤹¤ë¡£systemd¤Î¥Ç¥Õ¥©¥ë¥ÈÃͤϡ¢ÈÆÍѤÎLinux¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó¤òÁÛÄꤷ¤Æ¤¤¤ë¤¿¤á¡¢É¬¤º¤·¤âWSL¤Ç¤ÎÍøÍѤ˺ÇŬ²½¤µ¤ì¤Æ¤¤¤Ê¤¤¡£¤³¤³¤Ç¤Ï¡¢½é´ü²½»þ´Ö¤ÎŤ¤¥æ¥Ë¥Ã¥È¤òõ¤·¡¢ÉÔÍפʥæ¥Ë¥Ã¥È¤òºï½ü¤¹¤ë¤¿¤á¤ÎÊýË¡¤ò²òÀ⤹¤ë¡£

¤Ê¤ª¡¢systemd¤Î´ðËÜŪ¤Ê¤³¤È¤Ë´Ø¤·¤Æ¤Ï¡¢Á°¡¹²óµ­»ö¡ÖÂè18²ó systemd ´ðËÜÊԡפª¤è¤ÓÁ°²óµ­»ö¡ÖÂè19²ó systemd ¥³¥Þ¥ó¥ÉÊԡפò»²¾È¤µ¤ì¤¿¤¤¡£

¤Ê¤ª¡¢É¾²Á¤Ë¤Ï¡¢Windows 11 Ver.22H2¤ÈWSL¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó¤È¤·¤Æ¤ÏUbuntu¡Ê22.04.2 LTS¡Ë¤òÍøÍѤ·¤¿¡£Linux¥«¡¼¥Í¥ë¤Î¥Ð¡¼¥¸¥ç¥ó¤Ï¡¢5.15.90.1-microsoft-standard-WSL2¤Ç¤¢¤ë¡Ê¼Ì¿¿01¡Ë¡£

¼Ì¿¿01: WSL¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó¤ÏUbuntu¡Ê22.04.2 LTS¡Ë¡£Linux¥«¡¼¥Í¥ë¤Î¥Ð¡¼¥¸¥ç¥ó¤Ï¡¢5.15.90.1-microsoft-standard-WSL2

systemd-analyze¥³¥Þ¥ó¥É

systemd¤Îµ¯Æ°»þ´Ö¤Î¾Ü¤·¤¤Ä´ºº¤Ë¤Ï¡¢systemd-analyze¥³¥Þ¥ó¥É¤¬ÍøÍѤǤ­¤ë¡£¤³¤Î¥³¥Þ¥ó¥É¤Ï¡¢µ¯Æ°»þ¤ÎÅý·×¾ðÊó¤ä¤½¤Î¾¤Î¾ðÊó¤ò²òÀϤ·¤ÆÍ×Ìó¤·¤¿¾ðÊó¤òÄ󶡤¹¤ë¤¿¤á¤Î¤â¤Î¤Ç¤¢¤ë¡£systemd¤¬Æ°ºî¤·¤Æ¤¤¤ë¤È¤­¤ÎLinux¥·¥¹¥Æ¥à¤Îµ¯Æ°»þ¤Î¿¶¤ëÉñ¤¤¤ä½èÍý»þ´Ö¤Ê¤É¤òÄ´¤Ù¤ë¤Ë¤Ï¡¢¤³¤ì¤ò»È¤¦¡£

¤Þ¤¿¡¢¤³¤Î¥³¥Þ¥ó¥É¤«¤éÆÀ¤é¤ì¤¿Ä´ºº¤¹¤Ù¤­¥æ¥Ë¥Ã¥È¤Î¾ðÊó¤Ê¤É¤Ë´Ø¤·¤Æ¤Ï¡¢Á°²ó²òÀ⤷¤¿systemd¥³¥Þ¥ó¥É¤òÍøÍѤ¹¤ë¡£

systemd-analyze¥³¥Þ¥ó¥É¤Ï¡¢¥µ¥Ö¥³¥Þ¥ó¥É¤Ç¤µ¤Þ¤¶¤Þ¤Êµ¡Ç½¤ò¼Â¹Ô¤Ç¤­¤ë¡£É½01¤ÏÍøÍѤËɬÍפʺÇÄã¸Â¤Î¥µ¥Ö¥³¥Þ¥ó¥É¤À¡£systemd-analyze¤Ë¤Ï¡¢Â¿¿ô¤Î¥µ¥Ö¥³¥Þ¥ó¥É¡¢¥ª¥×¥·¥ç¥ó¤¬¤¢¤ë¤¬¡¢¤³¤ì¤À¤±¤ÏºÇÄã¸ÂÍý²ò¤·¤Æ¤ª¤¯É¬Íפ¬¤¢¤ë¡£¤½¤Î¾¤Î¥µ¥Ö¥³¥Þ¥ó¥É¤ä¥ª¥×¥·¥ç¥ó¤Ë´Ø¤·¤Æ¤Ï¡¢¡È--help¡É¥ª¥×¥·¥ç¥ó¤ò»È¤¦¤«¡¢man¥Ú¡¼¥¸¤ò»²¾È¤µ¤ì¤¿¤¤¡£

¢£É½01

¥µ¥Ö¥³¥Þ¥ó¥É¤ò¾Êά¤¹¤ë¤Ètime¥µ¥Ö¥³¥Þ¥ó¥É¤¬»ØÄꤵ¤ì¤¿¤È¤ß¤Ê¤µ¤ì¤ë¡£¤³¤Î¥³¥Þ¥ó¥É¤Ç¤Ï¡¢ÂоݤȤʤä¿¥æ¥Ë¥Ã¥È¤¬¤¹¤Ù¤Æµ¯Æ°¤µ¤ì¤ë¤Þ¤Ç¤Î·Ð²á»þ´Ö¤ò¬Äꤹ¤ë¡£

ºÇ¤â»þ´Ö¤¬¤«¤«¤Ã¤Æ¤¤¤ëµ¯Æ°·ÐÏ©¤òõ¤¹¤Ë¤Ï¡¢critical-chain¥µ¥Ö¥³¥Þ¥ó¥É¤ò»È¤¦¡£¤³¤ì¤Ï¡¢µ¯Æ°½èÍý¤ÎÃæ¤Ç¡¢°Í¸´Ø·¸¤Ë¤¢¤ê¡¢ºÇ¤â»þ´Ö¤Î³Ý¤«¤Ã¤Æ¤¤¤ë·ÐÏ©¤òõ¤¹¤â¤Î¤À¡£ÀÖ¤Çɽ¼¨¤µ¤ì¤ëÉôʬ¤¬·ÐÏ©¤ÎÃæ¤Ç¤â½é´ü²½¤Ë»þ´Ö¤òÍפ·¤Æ¤¤¤ë¤â¤Î¤Ë¤Ê¤ë¡£

systemd¥í¥°¤Îɽ¼¨

µ¯Æ°¤Ë»þ´Ö¤¬¤«¤«¤ë¥æ¥Ë¥Ã¥È¤Ç¤Ï¡¢¥¨¥é¡¼¤¬µ¯¤­¤Æ¤¤¤ë¤³¤È¤¬¤¢¤ë¡£¤³¤¦¤·¤¿¥æ¥Ë¥Ã¥È¤Îµ¯Æ°¤òÄ´¤Ù¤ë¤Ë¤Ï¡¢systemd¤Î¥í¥°¥Õ¥¡¥¤¥ë¤òÄ´¤Ù¤ë¡£

systemd¤Î¥í¥°¥Õ¥¡¥¤¥ë¤Ï¡¢journalctl¥³¥Þ¥ó¥É¤Ç¤ß¤ë¤³¤È¤¬²Äǽ¤À¡£¡Êɽ02¡Ë¤ËºÇÄã¸Â³Ð¤¨¤ë¤Ù¤­journalctl¤Î¥µ¥Ö¥³¥Þ¥ó¥É¡¢¥ª¥×¥·¥ç¥ó¤ò¼¨¤¹¡£¤Ê¤ª¡¢¤¹¤Ù¤Æ¤Î¥ª¥×¥·¥ç¥ó¤ä¾ÜºÙ¤Ê²òÀâ¤Ë¤Ä¤¤¤Æ¤Ï¡¢¡Ö--help¡×¥ª¥×¥·¥ç¥ó¤äman¥Ú¡¼¥¸¤ò»²¾È¤·¤Æ¤Û¤·¤¤¡£¤Þ¤¿¡¢¥¤¥ó¥¿¡¼¥Í¥Ã¥ÈÆâ¤Ë¤âjournalctl¤Ë´Ø¤¹¤ë²òÀâµ­»ö¤Ï¿¿ô¤¢¤ë¡£

¢£É½02

journalctl¥³¥Þ¥ó¥É¤ÇÆÃÄê¤Î¥æ¥Ë¥Ã¥È¤Ë¤Ä¤¤¤ÆÄ´¤Ù¤ë¤Ë¤Ï¡¢

journalctl␣--unit="networkd*"␣--no-hostname␣--boot=0

¢¨␣¤ÏȾ³Ñ¥¹¥Ú¡¼¥¹¤ò¼¨¤¹

¤È¤¹¤ë¡£¤Ê¤ª¡¢¤³¤Î¥³¥Þ¥ó¥É¤Ï¡Öjournalctl␣-u␣"networkd*"␣--no-hostname␣-b¡×¤Î¤è¤¦¤Ê¾Êά·Á¤¬ÍøÍѤǤ­¤ë¡£

¥á¥Ã¥»¡¼¥¸¤¬Ä¹¤¯¡¢¥¿¡¼¥ß¥Ê¥ë¤Îü¤ò¤Ï¤ß½Ð¤¹¤è¤¦¤Ê¤é¡¢»þ¹ï¤ò¾Êά¤·¤Æɽ¼¨¤¹¤ë¡Ö--output=cat¡×¥ª¥×¥·¥ç¥ó¤òÄɲ乤롣

systemd¤Î¥í¥°¤Ï¡¢µ¯Æ°»þ¤Ë¼èÆÀ¤µ¤ì¤ë¤¿¤á¡¢¥í¥°¤Îµ­Ï¿¤Ë¤Ï¡¢Ê£¿ô²ó¤ÎºÆµ¯Æ°»þ¤Î¥í¥°¤¬Æþ¤Ã¤Æ¤¤¤ë¡£-b¤¢¤ë¤¤¤Ï¡Ö--boot¡×¥ª¥×¥·¥ç¥ó¤Ï¡¢¥í¥°ÈϰϤòºÆµ¯Æ°¤´¤È¤Ë»ØÄꤹ¤ë¤â¤Î¡£¡Ö--boot␣0¡×¤Ï¡¢Ä¾¶á¤ÎºÆµ¯Æ°»þ¤Î¥í¥°¤Ëjournalctl¤Î½ÐÎϤò¸ÂÄꤹ¤ë¤â¤Î¡£¡Ö-b¡×¤Ï¡¢¤½¤Î¾Êά·Á¤Ç¡¢¥Ñ¥é¥á¡¼¥¿¡¼¤Îbootid¤ò¾Êά¤¹¤ë¤Èľ¶á¤ÎºÆµ¯Æ°¤òɽ¤¹¡Ö0¡×¤¬²¾Äꤵ¤ì¤ë¡£

½é´ü²½»þ´Ö¤òÄ´¤Ù¤ë¤È¤­

½é´ü²½»þ´Ö¤òÄ´¤Ù¤ë¾ì¹ç¡¢°ì²óWSL¼«ÂΤòÄä»ß¤µ¤»¤¿¤Û¤¦¤¬¤è¤¤¡£¤½¤Î¤¿¤á¤Ë¤Ï¡¢PowerShell¤Ê¤ÉWSL³°¤«¤é¡Öwsl.exe --shutdown¡×¤ò¼Â¹Ô¤¹¤ë¡£

¤Þ¤¿¡¢systemd¤Ï¡¢¤µ¤Þ¤¶¤Þ¤Ê¥·¥¹¥Æ¥à¥µ¡¼¥Ó¥¹¤Îµ¯Æ°¤Ë»È¤ï¤ì¤Æ¤¤¤ë¤¿¤á¡¢¥æ¥Ë¥Ã¥È¤ä¥µ¡¼¥Ó¥¹¤òÄä»ß¤·¤Æ¤·¤Þ¤¦¤È¡¢WSL¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó¼«ÂΤ¬Æ°ºî¤·¤Ê¤¯¤Ê¤ë²ÄǽÀ­¤â¤¢¤ë¡£Áàºî¤Ï¿µ½Å¤Ë¹Ô¤¦¤Ù¤­¤À¤¬¡¢WSL¤Î¾ì¹ç¡¢ºÆ¥¤¥ó¥¹¥È¡¼¥ë¤ò¹Ô¤¦¤³¤È¤Ç¡¢´°Á´¤Ê½é´ü¾õÂÖ¤ËÌ᤹¤³¤È¤Ï²Äǽ¤À¡£¤¿¤À¤·¡¢WSLÆâ¤Ç¹Ô¤Ã¤¿ÀßÄê¤ä¥Õ¥¡¥¤¥ë¤Ê¤É¤Ï¤¹¤Ù¤Æ¾Ã¤¨¤Æ¤·¤Þ¤¦¡£¤³¤Î¤¿¤á¡¢¥Ð¥Ã¥¯¥¢¥Ã¥×¤ò¹Ô¤Ã¤Æ¤ª¤¯¤«¡¢¼Â¹Ô¥¤¥á¡¼¥¸¤ò¥³¥Ô¡¼¤·¤Æ¼Â¸³ÍѤΥǥ£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó¤òºîÀ®¤·¤Æ¤ª¤¯¤È¤¤¤¤¤À¤í¤¦¡£¤³¤Î¤¢¤¿¤ê¤Ë´Ø¤·¤Æ¤Ï¡¢²áµîµ­»ö¡Ê¡ÖÂè16²ó WSL¤Î¥Ð¥Ã¥¯¥¢¥Ã¥×¤È¥ê¥¹¥È¥¢¡× ¤ä¡¢¡ÖÂè17²ó WSL¤Î¥Ð¥Ã¥¯¥¢¥Ã¥×¤È¥ê¥¹¥È¥¢ ±þÍÑÊԡפò»²¹Í¤Ë¤·¤Æ¤Û¤·¤¤¡£

½é´ü²½»þ´Ö¤ÎŤ¤¥µ¡¼¥Ó¥¹¤ò̵¸ú²½

systemd¤Î½é´ü²½¤ËÍפ·¤¿»þ´Ö¤Ï¡¢¡Ösystemd-analyze¡×¥³¥Þ¥ó¥É¤ò»È¤¦¡£¥ª¥×¥·¥ç¥ó¤Ê¤·¤Çµ¯Æ°¤¹¤ì¤Ð¡¢½é´ü²½»þ´Ö¤òɽ¼¨¤¹¤ë¡Ê¼Ì¿¿02¡Ë¡£Ubuntu¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó¤Î¾ì¹ç¡¢É®¼Ô¤Î´Ä¶­¤Ç¤Ï2.5Éäۤɤ«¤«¤Ã¤Æ¤¤¤ë¡£¤³¤Î»þ´Ö¤Ï¡¢WSL¤Îµ¯Æ°»þ´Ö¤Ë±Æ¶Á¤¹¤ë¤¿¤á¡¢¤³¤ì¤òû¤¯¤¹¤ë¤³¤È¤Ç¡¢WSL¤Îµ¯Æ°»þ´Ö¤òû½Ì¤Ç¤­¤ë¡£

¼Ì¿¿02: ¥¤¥ó¥¹¥È¡¼¥ëľ¸å¤ÎUbuntu¤Çsystemd-analyze¥³¥Þ¥ó¥É¤ò»È¤Ã¤Æ¡¢½é´ü²½»þ´Ö¤ª¤è¤Ó¡¢»þ´Ö¤Î³Ý¤«¤Ã¤Æ¤¤¤ë°Í¸´Ø·¸¤Î¤¢¤ë¥æ¥Ë¥Ã¥È¤òɽ¼¨¤µ¤»¤¿¡£¤³¤ì¤Ë¤è¤ë¤Èsystemd¤Î½é´ü²½¤Ë2.5ÉÃÄøÅÙ¤«¤«¤Ã¤Æ¤¤¤ë

ºÇ¤â»þ´Ö¤¬¤«¤«¤Ã¤Æ¤¤¤ë°ìÏ¢¤Î¥æ¥Ë¥Ã¥È¤òõ¤¹¤Ë¤Ï¡¢¡Ösystemd-analyze critical-chain¡×¥³¥Þ¥ó¥É¤ò»È¤¦¡£¤³¤Î¥³¥Þ¥ó¥É¤Ç¤Ï¡¢ºÇ¤â»þ´Ö¤¬¤«¤«¤Ã¤¿¡¢°Í¸´Ø·¸¤Ë¤¢¤ë¥æ¥Ë¥Ã¥È¤Ë¤è¤ë·ÐÏ©¡Êchain¡Ë¤¬É½¼¨¤µ¤ì¤ë¡£¤³¤Î¤¦¤ÁÀÖ¤Çɽ¼¨¤µ¤ì¤Æ¤¤¤ë¤Î¤¬»þ´Ö¤¬¤«¤«¤Ã¤Æ¤¤¤ë¥³¥Þ¥ó¥É¤Ç¤¢¤ë¡£¤Þ¤¿¡¢¥Ä¥ê¡¼¤ÎÀèƬ¤Ëɽ¼¨¤µ¤ì¤ë¤Î¤Ï¡¢systemd¤Îµ¯ÅÀ¤È¤Ê¤ë¥æ¥Ë¥Ã¥È¡Ê¥¿¡¼¥²¥Ã¥È¡Ë¤Ç¤¢¤ë¡£

¤³¤ì¤ò¤ß¤ë¤È¡¢¡Ösnap¡×¤ä¡Ösnapd¡×´ØÏ¢¤Î¥æ¥Ë¥Ã¥È¤¬»þ´Ö¤ò»È¤Ã¤Æ¤¤¤ë¤è¤¦¤À¡£¤³¤Î¾õÂ֤Ǥϡ¢snap¤äsnapd¤¬²¿¤Ç¤¢¤ë¤Î¤«¤¬Ê¬¤«¤é¤Ê¤¤¡£¤Þ¤º¤Ï¥æ¥Ë¥Ã¥È¤òÄ´¤Ù¤Æ¤ß¤è¤¦¡£¤Þ¤º¤Ï¡¢ºÇ¤âÀèƬ¤Ë¤¢¤ë¡Èsnapd.seeded.service¡É¤À¡£

°Ê²¼¤Î¥³¥Þ¥ó¥É¤ò»È¤¤¡¢¥æ¥Ë¥Ã¥È¥Õ¥¡¥¤¥ë¤òɽ¼¨¤µ¤»¤ë¡Ê¼Ì¿¿03¡Ë¡£

systemctl␣cat␣snapd.seeded.service

¢¨␣¤ÏȾ³Ñ¥¹¥Ú¡¼¥¹¤ò¼¨¤¹¡£°Ê²¼Æ±ÍÍ

¼Ì¿¿03: »þ´Ö¤Î¤«¤«¤Ã¤Æ¤¤¤ësnapd.seeded.service¤Î¥æ¥Ë¥Ã¥È¥Õ¥¡¥¤¥ë¤ò¡¢systemctl cat¥³¥Þ¥ó¥É¤Çɽ¼¨¤µ¤»¤¿¡£¤Þ¤¿¡¢man¥Ú¡¼¥¸¤Ësnap¤ò¥­¡¼¥ï¡¼¥É¤È¤¹¤ë¹àÌܤ¬¤¢¤ë¤«¤É¤¦¤«¤âÄ´¤Ù¤¿¡£snap¤Îman¥Ú¡¼¥¸¤¬¤¢¤ë¤Î¤Ç¡¢¤³¤ì¤ò¤ß¤ë

¥æ¥Ë¥Ã¥È¥Õ¥¡¥¤¥ë¤Î¼Â¹ÔÀßÄê¡ÊExecStart¡Ë¤Ë¡Ö/usr/bin/snap¡×¤È¤¤¤¦¥³¥Þ¥ó¥É¤¬¤¢¤ë¡£

¡Èsnap¡É¤È¤¤¤¦¥³¥Þ¥ó¥É¤¬¤¢¤ë¤è¤¦¤Ê¤Î¤Ç¡¢man¥Ú¡¼¥¸¤¬¤Ê¤¤¤«Ãµ¤¹¡£¤½¤ì¤Ë¤Ï¡Öman␣-k␣snap¡×¤È¤¹¤ë¡£¤Þ¤µ¤Ësnap¤È¤¤¤¦man¥Ú¡¼¥¸¤¬¤¢¤ë¤Î¤Ç¤³¤ì¤ò¡Öman snap¡×¤Çɽ¼¨¤µ¤»¤Æ¤ß¤ë¡Ê¼Ì¿¿04¡Ë¡£

¼Ì¿¿04: snap¥³¥Þ¥ó¥É¤Ï¡¢¤É¤¦¤ä¤é¥×¥í¥°¥é¥à¥Ñ¥Ã¥±¡¼¥¸¤Î´ÉÍý¥Ä¡¼¥ë¤é¤·¤¤¤³¤È¤¬man¥Ú¡¼¥¸¤«¤é¿ä¬¤Ç¤­¤ë¡£¤¢¤È¤Ï¡¢¥¤¥ó¥¿¡¼¥Í¥Ã¥È¸¡º÷¤Ê¤É¤Çsnap¤äsnapd¤Ë¤Ä¤¤¤ÆÄ´¤Ù¤¿

¤½¤ì¤Ë¤è¤ì¤Ð¡¢snap¤Ï¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó¤Ë°Í¸¤·¤Ê¤¤¥Ñ¥Ã¥±¡¼¥¸¤Î´ÉÍý¥×¥í¥°¥é¥à¤Î¤è¤¦¤À¡£¤È¤ê¤¢¤¨¤º¡¢snap¥³¥Þ¥ó¥É¤Î¥Ø¥ë¥×¤ò¼Â¹Ô¤·¤Æ¤ß¤ë¡Ê¼Ì¿¿05¡Ë¡£´ðËÜŪ¤Ê¥ª¥×¥·¥ç¥ó¤È¤·¤Æ¡Èlist¡É¡¢¡Èinfo¡É¤Ê¤É¤¬¤¢¤ë¤è¤¦¤À¡£¾ðÊóɽ¼¨¤Î¥³¥Þ¥ó¥É¤Ç¤¢¤ì¤Ð¡¢¥·¥¹¥Æ¥à¾õÂÖ¤òÊѹ¹¤¹¤ë²ÄǽÀ­¤ÏÄ㤤¤È¹Í¤¨¤é¤ì¤ë¤Î¤Ç»î¤·¤Ë¡Ösnap list¡×¤ò¼Â¹Ô¤·¤Æ¤ß¤ë¡Ê¼Ì¿¿06¡Ë¡£¤¹¤ë¤È5¤Ä¤Û¤É¤Îsnap¤¬ÁȤ߹þ¤Þ¤ì¤Æ¤¤¤ë¤è¤¦¤À¡£¤½¤ì¤¾¤ì¤Ï¡¢¡Ösnap info¡×¤Ç¾ÜºÙ¤ò¤ß¤ë¤³¤È¤¬¤Ç¤­¤ë¡£

¼Ì¿¿05: snap¥³¥Þ¥ó¥É¤Î¥Ø¥ë¥×¥Ú¡¼¥¸¤ò¤ß¤ë¡£¤³¤ì¤Ë¤è¤ë¤È¡¢info¤älist¤È¤¤¤¦¾ðÊóɽ¼¨´ØÏ¢¤È»×¤ï¤ì¤ë¥µ¥Ö¥³¥Þ¥ó¥É¤¬¤¢¤ë¤è¤¦¤À¡£¤³¤ÎÄøÅ٤Υ³¥Þ¥ó¥É¤Ç¤¢¤ì¤Ð¡¢snap¤Î¾õÂÖ¤òÊѤ¨¤ë¤³¤È¤Ï¤Ê¤¤¤À¤í¤¦¤È»î¤·¤Æ¤ß¤ë

¼Ì¿¿06: snap list¤Ï¡¢¤É¤¦¤ä¤é¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¥Ñ¥Ã¥±¡¼¥¸¤òɽ¼¨¤¹¤ë¤â¤Î¤é¤·¤¤¡£¤Þ¤¿¡¢info¥µ¥Ö¥³¥Þ¥ó¥É¤Ç¥Ñ¥Ã¥±¡¼¥¸¤Î¾ðÊó¤òÆÀ¤é¤ì¤ë¡£¤³¤ì¤é¤ò»È¤Ã¤¿·ë²Ì¡¢snap¤ÏÆ°ºî¤·¤Æ¤¤¤ë¤¬¡¢¥·¥¹¥Æ¥à¤ÎÆ°ºî¤òÊѤ¨¤Æ¤·¤Þ¤¦¤è¤¦¤Ê¥Ñ¥Ã¥±¡¼¥¸¤Ï¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤Ê¤¤¤è¤¦¤À

¤³¤ì¤é¤Î¥³¥Þ¥ó¥É¤«¤éÆÀ¤é¤ì¤¿¾ðÊó¤È¤·¤Æ¤Ï¡¢snap¼«ÂΤÏÆ°ºî¤·¤Æ¤¤¤ë¤¬¡¢Æä˥·¥¹¥Æ¥à´ØÏ¢¤Îµ¡Ç½¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤¤¤ë¤ï¤±¤Ç¤â¤Ê¤µ¤½¤¦¤À¡£

¤â¤·¡¢¡Ösnap¡×¤ä¡Ösnapd¡×¤¬apt¥Ñ¥Ã¥±¡¼¥¸¥Þ¥Í¡¼¥¸¥ã¡¼¤Ç´ÉÍý¤µ¤ì¤Æ¤¤¤ë¤Ê¤é¡¢¥¢¥ó¥¤¥ó¥¹¥È¡¼¥ë¤ÏÍưפǤ¢¤ë¡£¤³¤ì¤òÄ´¤Ù¤Æ¸«¤ë¡£

¡Öapt␣list␣--installed␣--all-versions␣"snap"¡×¤È¤¹¤ë¤³¤È¤Ç¡Èsnapd¡É¤ò´Þ¤à¥Ñ¥Ã¥±¡¼¥¸¤ò¸¡º÷¤Ç¤­¤ë¡Ê¼Ì¿¿07¡Ë¡£

¼Ì¿¿07: ¼¡¤ËUbuntu¤Îɸ½à¥Ñ¥Ã¥±¡¼¥¸´ÉÍý¥Ä¡¼¥ë¤Ç¤¢¤ëapt¤ò»È¤Ã¤Æ¡¢snap¤¬´ÉÍý¤µ¤ì¤Æ¤¤¤ë¤«¤É¤¦¤«¤òÄ´¤Ù¤ë¡£¡Èsnapd¡É¤¬apt¤Ç´ÉÍý¤µ¤ì¤Æ¤¤¤ë¤è¤¦¤Ê¤Î¤Ç¡¢apt¤«¤é¥¢¥ó¥¤¥ó¥¹¥È¡¼¥ë¡Êremove¡Ë¤¬²Äǽ¤À¤Ã¤¿

apt¥Ñ¥Ã¥±¡¼¥¸¥Þ¥Í¡¼¥¸¥ã¤Ç´ÉÍý¤µ¤ì¤Æ¤¤¤ë¤Ê¤é¡¢Ëü°ì¡¢¤¢¤È¤ÇɬÍפˤʤ俾ì¹ç¤Ç¤â¡¢Ì᤹¤³¤È¤âÆñ¤·¤¯¤Ê¤¤¡£ÌäÂê¤Ê¤µ¤½¤¦¤Ê¤Î¤Ç¡¢¡Ösudo␣apt␣remove␣snapd¡×¤È¤·¤Æ¥¢¥ó¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤ß¤ë¡£

¤½¤Î¸å¡¢ºÆÅÙµ¯Æ°¾õÂÖ¤ò³Îǧ¤¹¤ë¤Ë¤Ï¡¢WSL¤ò°ì²ó´°Á´¤Ë½ªÎ»¤µ¤»¤ë¡£¤½¤ì¤Ë¤Ï¡¢PowerShell¤Ê¤ÉWin32¦¤Ç¡Öwsl --shutdown¡×¤È¤¹¤ë¡£

ºÆÅÙWSL¤òµ¯Æ°¤·¤Æ¡Ösystemd-analyze¡×¥³¥Þ¥ó¥É¤ò»È¤¦¤È¡¢µ¯Æ°»þ´Ö¤Ï400¥ß¥êÉäޤÇû½Ì¤µ¤ì¤Æ¤¤¤ë¡Ê¼Ì¿¿08¡Ë¡£

¼Ì¿¿08: snapd¤ò¥¢¥ó¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¤¢¤È¡¢WSL¤ò¥·¥ã¥Ã¥È¥À¥¦¥ó¤·¤¿¤Î¤Á¡¢ºÆÅÙWSL¤òΩ¤Á¾å¤²¡¢systemd-analyze¥³¥Þ¥ó¥É¤ÇºÆÅÙ¡¢½é´ü²½»þ´Ö¤òÄ´¤Ù¤¿¡£¤½¤ì¤Ë¤è¤ë¤È¡¢400¥ß¥êÉÃÄøÅ٤ˤޤǽé´ü²½»þ´Ö¤¬Ã»½Ì¤·¤Æ¤¤¤ë¡£º£Å٤ϡ¢networkd-dispatcher.service¤¬½é´ü²½»þ´Ö¤ò·è¤á¤Æ¤¤¤ë¤è¤¦¤À

¤µ¤é¤ËÄɵᤷ¤Æ¤ß¤ë¤¬¡Ä¡Ä

º£Å٤ϡ¢¡Ènetworkd-dispatcher.service¡É¤¬¥¯¥ê¥Æ¥£¥«¥ë¥Ñ¥¹¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£networkd¤Ï¡¢systemd¤Î°ìÉô¤È¤Ê¤ë¥Í¥Ã¥È¥ï¡¼¥¯´ØÏ¢¤Î¥µ¡¼¥Ó¥¹¤Ç¤¢¤ë¡£¤¿¤À¤·¡¢WSL2¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Ï¡¢²¾ÁÛ¥Þ¥·¥ó¦¤Ç´ÉÍý¤µ¤ì¤Æ¤¤¤ë¤¿¤á¡¢WSL¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó¦¤«¤é¤Û¤È¤ó¤ÉÀ©¸æ¤¹¤ëɬÍפϤʤ¤¡£²¿¤«ÌäÂ꤬¤¢¤ë¤«¤â¤·¤ì¤Ê¤¤¤Î¤Ç¥í¥°¤ò³Îǧ¤·¤Æ¤ª¤¯¡£

journalctl␣-b␣-u␣networkd-dispatcher.service

¤³¤ì¤Ë¤è¤ì¤Ð¡¢lo¡Ê¥í¡¼¥«¥ë¥ë¡¼¥×¥Ð¥Ã¥¯¡¦¥Í¥Ã¥È¥ï¡¼¥¯¥Ç¥Ð¥¤¥¹¡Ë¤äeth0¡Ê¥Í¥Ã¥È¥ï¡¼¥¯¡Ë¤Ç¥¨¥é¡¼¤¬½Ð¤Æ¤¤¤ë¡£

networkd¤Ë´Ø¤·¤Æ¤Ï¡¢ÀìÍѤδÉÍý¥³¥Þ¥ó¥Énetworkctl¤¬¤¢¤ë¡£¥µ¥Ö¥³¥Þ¥ó¥É¤Ê¤·¤Çµ¯Æ°¤¹¤ë¤È¡¢¸½ºß¤Î¾õÂÖ¤òɽ¼¨¤¹¤ë¡Ê¼Ì¿¿09¡Ë¡£¤³¤ì¤Ë¤è¤ë¤È¡¢networkd¼«ÂΤ¬Æ°ºî¤·¤Æ¤¤¤Ê¤¤¤è¤¦¤Ç¤¢¤ë¡£WSL¤Ç¤Ï¡¢¥Í¥Ã¥È¥ï¡¼¥¯¤òVM¦¤Ç´ÉÍý¤·¤Æ¤¤¤ë¤¿¤á¡¢¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó¦¤«¤é¤ÎÀ©¸æ¤¬¹Ô¤¨¤Ê¤¤¤¿¤á¤À¤È¹Í¤¨¤é¤ì¤ë¡£¤Ê¤Î¤Ç¡¢¥í¥°¤Ëlo¤äeth0¤Ç¥¨¥é¡¼¤¬µ­Ï¿¤µ¤ì¤Æ¤¤¤¿¤È¹Í¤¨¤é¤ì¤ë¡£¤½¤·¤Æ¡¢ÂоݤȤʤë¥Í¥Ã¥È¥ï¡¼¥¯¥Ç¥Ð¥¤¥¹¤¬¤Ê¤¤¤¿¤á¡¢networkd¤¬Æ°ºî¤·¤Æ¤¤¤Ê¤¤¤È¹Í¤¨¤é¤ì¤ë¡£

¼Ì¿¿09: networkd¤Ï¡¢systemd¤Ë´Þ¤Þ¤ì¤ë¥Í¥Ã¥È¥ï¡¼¥¯´ÉÍý¥Ç¡¼¥â¥ó¤Ç¤¢¤ë¡Êman¥Ú¡¼¥¸¤ÇÄ´¤Ù¤ë¤³¤È¤¬¤Ç¤­¤ë¡Ë¡£systemd´ØÏ¢¤Ê¤Î¤Ç¡¢¤Þ¤º¤Ï¡¢¥í¥°¤Ë¥¨¥é¡¼¤Ê¤É¤¬¤Ê¤¤¤«Ä´¤Ù¤Æ¸«¤¿¡£¤¤¤¯¤Ä¤«¥Í¥Ã¥È¥ï¡¼¥¯¥Ç¥Ð¥¤¥¹´ØÏ¢¤Î¥¨¥é¡¼¤¬¤¢¤ë¡£¤Þ¤¿¡¢networkd¤Î´ÉÍý¥Ä¡¼¥ënetworkctl¤ò»È¤¦¤È¡¢ÂоݥǥХ¤¥¹¤¬¤Ê¤¤¤¿¤ánetworkd¤¬Æ°ºî¤·¤Æ¤¤¤Ê¤¤¤³¤È¤¬¤ï¤«¤ë

networkd¤¬Æ°ºî¤·¤Æ¤¤¤Ê¤¤¤Î¤Ç¡Önetworkd-dispatcher.service¡×¤ò»ß¤á¤Æ¤âÂç¾æÉפǤ¢¤í¤¦¡£

sudo␣systemctl␣disable␣networkd-dispatcher.service

¾åµ­¥³¥Þ¥ó¥É¤ò¼Â¹Ô¸å¡¢ºÆµ¯Æ°¤·¤Æ¡¢Æ±ÍͤËÄ´¤Ù¤ë¤È½é´ü²½»þ´Ö¤Ï348¥ß¥êÉáÊ348 ms¡Ë¤È¤¢¤Þ¤êû¤¯¤Ê¤Ã¤Æ¤¤¤Ê¤¤¡Ê¼Ì¿¿10¡Ë¡£¤³¤ì°Ê¾å¤Ï¡¢¼ê´Ö¤ò¤«¤±¤Æ¤â¤ï¤º¤«¤Ê»þ´Ö¤·¤«Ã»½Ì¤Ç¤­¤Ê¤µ¤½¤¦¤À¡£¤Þ¤¿¡¢»Ä¤ê¤Î¥µ¡¼¥Ó¥¹¤Î̾¾Î¤Ësystemd¤¬¤¢¤ê¡¢systemdÁ´ÂΤ˱ƶÁ¤â½Ð¤½¤¦¤Ê¤Î¤Ç¡¢¤³¤Î¤¢¤¿¤ê¤Ç¤ä¤á¤Æ¤ª¤¯¤Ù¤­¤À¤í¤¦¡£

¼Ì¿¿10: systemctl disable¥³¥Þ¥ó¥É¤Çnetworkd-dispatcher.service¤ò¼Â¹Ô¤µ¤»¤è¤¦¤Ë¤·¤Æ¡¢ºÆµ¯Æ°¤·¤Æ½é´ü²½»þ´Ö¤ò¬Äꤹ¤ë¡£348¥ß¥êÉäÈ50¥ß¥êÉäۤÉû½Ì¤µ¤ì¤¿¤¬¡¢¼ê´Ö¤ò¤«¤±¤¿³ä¤Ë¤Ï¤Û¤È¤ó¤ÉÊѤï¤é¤Ê¤¤¡£¤³¤ì°Ê¾å¤Ï̵°ÕÌ£¤È¤·¤Æ¥Á¥å¡¼¥Ë¥ó¥°¤ò¤³¤³¤Ç½ªÎ»¤¹¤ë

systemd´ØÏ¢¤Î¥³¥Þ¥ó¥É¤ò»È¤¦¤³¤È¤Ç¡¢systemd¤Î½é´ü²½¤Î¸úΨ²½¤¬²Äǽ¤Ç¡¢¤½¤ì¤Ë¤è¤ê¡¢systemd»ÈÍÑ»þ¤Îµ¯Æ°»þ´Ö¤òû½Ì¤¹¤ë¤³¤È¤â¤Ç¤­¤ë¡£¤¿¤À¤·¡¢Íý²ò¤·¤Æ¤ª¤¤¤Æ¤Û¤·¤¤¤Î¤Ï¡¢WSL¤Ç¤Ïsystemd¤Ï¤Þ¤Àɬ¿Ü¤È¤¤¤¦¤ï¤±¤Ç¤â¤Ê¤¤¤¿¤á¡¢systemd¼«ÂΤò̵¸ú²½¤·¤Æµ¯Æ°»þ´Ö¤òû½Ì¤¹¤ëÊýË¡¤â¤¢¤ë¤³¤È¤À¡£

¡ä Windows Subsystem for Linux¥¬¥¤¥É Ï¢ºÜ¥Ð¥Ã¥¯¥Ê¥ó¥Ð¡¼

https://news.mynavi.jp/tag/winsubsystem/