Insider 㧠Windows 10 19041.1 ã« update ã㦠WSL2 ã« Arch ç°å¢ãä½ãç´ããã¡ã¢ ( æ¨å¤ã¾ã§ WSL1/Ubuntu ã使ã£ã¦ãã¾ãã )
â WSL2 㧠Arch linux ãåãã¦ã㦠Windows Terminal (Preview) ãã使ããæ§åã
æé ã¡ã¢:
- Windows 10 19041.1 (å·çæç¹) 以éã®ãã¼ã¸ã§ã³ã¸ã¢ãããã¼ããã (å·çæç¹ã§ã¯ã¾ã Windows Insider ã®ç»é²ã¨è¨å®ãå¿ è¦ã説æç¥ -> https://insider.windows.com/ )
- WSL2 ã使ç¨å¯è½ãæ¨æºã«è¨å® ( https://docs.microsoft.com/windows/wsl/wsl2-install )
- Tips:
dism.exe
ã¯ç®¡çè 権éã§å®è¡ããå¿ è¦ããããsudo
ã¨ãchoco
ãã¦ãªãã¨ããã©ããããã - Tips:
dism.exe
ã®å®è¡ä¾ããã®ã¾ã¾å®è¡ããã¨dism.exe
ã¯å¦çãè¿ããªãã®ã§ããã¤ã¾ã§ãã³ãã³ãã®å¦çãçµããã®ãå¾ ã¤å¿ è¦ã¯ãªãã£ã - Tips:
sudo dism ...
ã2ã¤å®è¡ãããå¦çãè¿ã£ã¦ããªããããã restart ããâ¦ã®ã ãã©ã念ã®ããæä½æ¥ã§å¯è½ãªéãåä½ä¸ã®ã¢ããªãçµäºããã¦ãã restart ããæ¹ãå®å ¨ã- ç§ã¯ãªãã TaskManager ãçµäºã§ããªããã©å¼·å¶çã«çµãããï¼ã¨ãåºã¦ãç¶æ³ç¢ºèªï¼æåã§çµãããããã¨Noãããâ¦Noããã®ã«â¦ãªããæ´æ°ãã¦ãã¾ãç»é¢ã«é·ç§»ãã¦ã¨ã¿ã¼ãã«æ´æ°çµãããªãç¶æ ã«çªå ¥ããã¾ããããã®å¾ãPCãã¡ã¤ã³ãã¼ãã¬ãã«ãããªã»ãããã¦ããç´ãã¾ããã
- Tips:
wsl --set-default-version 2
ãæå¾ åä½ããã°ãããã§WSL2æºåã¯å®äºã§ã
- Tips:
- https://wiki.archlinux.jp/index.php/WSL_%E3%81%AB%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB ãèªãã§ãããã©ããããªãã¨ããArchã®ãã«ããã·ã¼ã³å¿ è¦ãªã®ããã¨ãå°ãä¸å®ãè¦ãã¾ããè¦ããã ãã§ããã§ãã
- https://github.com/yuk7/ArchWSL/ ãçºè¦ãã¦ããããã¨ãâ¡ãã¨æãã¤ã¤ãä¸å¿ Arch ã«ã¯ Windows Store äºä»¶ããã£ãã®ã§ããã¨ãªãä¸èº«ã«ã¯æ°ãä»ãã¤ã¤ä½¿ããã¦é ãã¾ãã
- https://github.com/yuk7/ArchWSL/blob/master/README.ja.md#%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB ãªã©èªã㧠zip ã appx+cer ã©ã¡ãã§ã¤ã³ã¹ãã¼ã«ãããããèããé¸ã³ãé
ç½®ãã¦å®è¡ããã¨ååå®è¡æã« Windows ã®
wsl
ã³ãã³ãã§ãæ±ããç¶æ ã« register ããã¾ããåæã«ãWSL2 ã®è¨å®ãæ¨æºåãã¦ããã°ãrootfs.tar.gz
ããèªåçã«ext4.vhdx
ãçãã¾ãã - https://github.com/yuk7/ArchWSL/wiki/How-to-Setup ãè¦ãªããã WSL2/Arch ã®åæç¶æ
ãæ´ãã¾ãã
pacman -Syu
ã®åã«ãpacman-key --init
ã¨pacman-key --populate
ãããããpacman -S archlinux-keyring
ããã¶ãå¿ è¦ã§ãã
- https://github.com/yuk7/ArchWSL/blob/master/README.ja.md#%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB ãªã©èªã㧠zip ã appx+cer ã©ã¡ãã§ã¤ã³ã¹ãã¼ã«ãããããèããé¸ã³ãé
ç½®ãã¦å®è¡ããã¨ååå®è¡æã« Windows ã®
- ãã¾ã: Windows Terminal ã®è¨å®ã§æ¨æºã§èµ·åããã¿ãã Arch ãããã¯ä»ã®ä½ãã«å¤ãããå ´åã¯
profiles.json
ã«globals.defaultProfile
ã追å ãã¦ãå¤ã«profiles[n].guid
ã®æååå¤ã¨åãå¤ãè¨å®ãã¾ãã( n ã¯åºãããã®ãããã¡ã¤ã«ã®ãã®ãç®grepãã¦æ¢ãã¦ãã ãã )