windows:wsl:install

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
次のリビジョン両方とも次のリビジョン
windows:wsl:install [2019/09/14 00:20] – [今後インストールする新しいディストリビューションが WSL 2 を既定のアーキテクチャとするように設定] ともやんwindows:wsl:install [2019/09/15 17:17] – [日本語環境に設定] ともやん
行 9: 行 9:
 </html> </html>
 ====== WSL 2 のインストール ====== ====== WSL 2 のインストール ======
 +本手順では、WSL 2 上に [[https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL|Fedora Rimix for WSL]] ディストリビューションをインストールする。\\
 +Fedora ファンとしては、Fedora Rimix for WSL が Fedora 公式ではないのがちょっと残念ではあるが、使い慣れた Fedora が Windows 10 でも使えるのはありがたい。\\
 +\\
 +現在 [[https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL|Fedora Rimix for WSL]] は [[https://www.pengwin.dev/|Whitewater Foundry]] が [[https://getfedora.org/ja/|Fedora Project]] 非公式でメンテしている。\\
 +実は、[[https://github.com/WhitewaterFoundry/WSLFedoraRemix/releases|GitHub]] を介して無料でサイドロードできる Fedora Remix for WSL の署名済みダウンロードも提供している。\\
 +無償で利用したい場合は試してみるとよいだろう。\\
 +\\
 ※ 2019/09/13 現在 Build 18917 以降は **[[windows:windows_10_insider_previews|Windows 10 Insider Previews]]** としてのみ公開されている。\\ ※ 2019/09/13 現在 Build 18917 以降は **[[windows:windows_10_insider_previews|Windows 10 Insider Previews]]** としてのみ公開されている。\\
 以下の手順は Build 18362 ~ 18980 へ更新しながら検証した。\\ 以下の手順は Build 18362 ~ 18980 へ更新しながら検証した。\\
行 363: 行 370:
 <WRAP prewrap 100% #result> <WRAP prewrap 100% #result>
 <code> <code>
-$ sudo dnf update+$ sudo dnf update
 Fedora Modular 30 - x86_64                              708 kB/s | 2.7 MB     00:03 Fedora Modular 30 - x86_64                              708 kB/s | 2.7 MB     00:03
 Fedora Modular 30 - x86_64 - Updates                    678 kB/s | 3.3 MB     00:04 Fedora Modular 30 - x86_64 - Updates                    678 kB/s | 3.3 MB     00:04
行 513: 行 520:
 Total download size: 63 M Total download size: 63 M
 Is this ok [y/N]: y Is this ok [y/N]: y
 +
 +~省略~
 +
 +  xkeyboard-config-2.26-2.fc30.noarch
 +  libsecret-0.18.8-1.fc30.x86_64
 +  unbound-libs-1.8.3-4.fc30.x86_64
 +
 +Complete!
 </code> </code>
 </WRAP> </WRAP>
 +
 +===== 日本語環境に設定 =====
 +標準のインストールだと日本語が **□** に文字化けする。\\
 +システムロケール設定が **en_US.UTF-8** になっているためである。\\
 +<code>
 +$ ll
 +drwxr-xr-x 1 tomoyan tomoyan      512 Nov 17  2015  Tracing
 +drwxr-xr-x 1 tomoyan tomoyan      512 Jan 23  2016  usb_driver
 +drwxr-xr-x 1 tomoyan tomoyan      512 Sep 13 23:24  Videos
 +drwxr-xr-x 1 tomoyan tomoyan      512 Nov 26  2015 'VirtualBox VMs'
 +drwxr-xr-x 1 tomoyan tomoyan      512 Jul 29 23:22  webrtc_event_logs
 +lrwxrwxrwx 1 tomoyan tomoyan       65 Sep 13 22:40 '□□□□ □□□□' -> '/mnt/c/Users/tomoyan/AppData/Roaming/Microsoft/Windows/Start Menu'
 +$ echo $LANG
 +en_US.UTF-8
 +</code>
 +
 +日本語ランゲージパックをインストールすると文字化けが解消される。\\
 +**sudo dnf install langpacks-ja** を実行する。\\
 +<WRAP prewrap 100% #result>
 +<code>
 +$ sudo dnf install langpacks-ja
 +Fedora Modular 30 - x86_64                               363 kB/s | 1.9 MB     00:05
 +Fedora Modular 30 - x86_64 - Updates                     318 kB/s | 2.9 MB     00:09
 +Fedora 30 - x86_64 - Updates                             249 kB/s |  24 MB     01:37
 +Fedora 30 - x86_64                                       237 kB/s |  61 MB     04:22
 +whitewaterfoundry_wslu                                   184  B/s | 833  B     00:04
 +Dependencies resolved.
 +====================================================================================
 + Package                            Arch      Version              Repository  Size
 +====================================================================================
 +Installing:
 + langpacks-ja                       noarch    1.0-17.fc30          fedora     8.4 k
 +Installing dependencies:
 + google-noto-cjk-fonts-common       noarch    20190416-2.fc30      updates     19 k
 +Installing weak dependencies:
 + glibc-langpack-ja                  x86_64    2.29-22.fc30         updates    323 k
 + google-noto-sans-cjk-ttc-fonts     noarch    20190416-2.fc30      updates     85 M
 + google-noto-serif-cjk-ttc-fonts    noarch    20190416-2.fc30      updates    109 M
 +
 +Transaction Summary
 +====================================================================================
 +Install  5 Packages
 +
 +Total download size: 194 M
 +Installed size: 297 M
 +Is this ok [y/N]: y
 +Downloading Packages:
 +(1/5): google-noto-cjk-fonts-common-20190416-2.fc30  27 kB/s |  19 kB     00:00
 +(2/5): glibc-langpack-ja-2.29-22.fc30.x86_64.rpm     83 kB/s | 323 kB     00:03
 +(3/5): langpacks-ja-1.0-17.fc30.noarch.rpm           73 kB/s | 8.4 kB     00:00
 +(4/5): google-noto-sans-cjk-ttc-fonts-20190416-2.fc  97 kB/s |  85 MB     15:03
 +(5/5): google-noto-serif-cjk-ttc-fonts-20190416-2.f 105 kB/s | 109 MB     17:36
 +------------------------------------------------------------------------------------
 +Total                                               188 kB/s | 194 MB     17:39
 +Running transaction check
 +Transaction check succeeded.
 +Running transaction test
 +Transaction test succeeded.
 +Running transaction
 +  Preparing        :                                                            1/1
 +  Installing       : google-noto-cjk-fonts-common-20190416-2.fc30.noarch        1/5
 +  Installing       : google-noto-sans-cjk-ttc-fonts-20190416-2.fc30.noarch      2/5
 +  Installing       : google-noto-serif-cjk-ttc-fonts-20190416-2.fc30.noarch     3/5
 +  Installing       : glibc-langpack-ja-2.29-22.fc30.x86_64                      4/5
 +  Installing       : langpacks-ja-1.0-17.fc30.noarch                            5/5
 +  Running scriptlet: langpacks-ja-1.0-17.fc30.noarch                            5/5
 +  Verifying        : glibc-langpack-ja-2.29-22.fc30.x86_64                      1/5
 +  Verifying        : google-noto-cjk-fonts-common-20190416-2.fc30.noarch        2/5
 +  Verifying        : google-noto-sans-cjk-ttc-fonts-20190416-2.fc30.noarch      3/5
 +  Verifying        : google-noto-serif-cjk-ttc-fonts-20190416-2.fc30.noarch     4/5
 +  Verifying        : langpacks-ja-1.0-17.fc30.noarch                            5/5
 +
 +Installed:
 +  langpacks-ja-1.0-17.fc30.noarch
 +  glibc-langpack-ja-2.29-22.fc30.x86_64
 +  google-noto-sans-cjk-ttc-fonts-20190416-2.fc30.noarch
 +  google-noto-serif-cjk-ttc-fonts-20190416-2.fc30.noarch
 +  google-noto-cjk-fonts-common-20190416-2.fc30.noarch
 +
 +Complete!
 +</code>
 +</WRAP>
 +
 +システムロケール設定を **ja_JP.UTF-8** に変更する。\\
 +<code>
 +$ sudo localectl set-locale LANG=ja_JP.UTF-8
 +System has not been booted with systemd as init system (PID 1). Can't operate.
 +Failed to create bus connection: Host is down
 +</code>
 +システムは、initd システム (PID 1) なので systemd として起動されていません。操作できません。\\
 +バスへの接続に失敗しました: ホストがダウンしています\\
 +\\
 +本物の Fedora の PID 1 は **/usr/lib/systemd/systemd** であるが...\\
 +<WRAP prewrap 100%>
 +<code>
 +$ ps aux
 +USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
 +root          0.0  0.5 171732  5500 ?        Ss    9月05   2:13 /usr/lib/systemd/systemd --switched-root --system --deserialize 33
 +root          0.0  0.0      0     0 ?        S     9月05   0:00 [kthreadd]
 +...
 +</code>
 +</WRAP>
 +
 +現状の WSL 2 では PID 1 は **/init** である。\\
 +<WRAP prewrap 100%>
 +<code>
 +$ ps aux
 +USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
 +root          0.0  0.0    888   560 ?        Sl   10:55   0:00 /init
 +root          0.0  0.0    896    80 ?        Ss   10:55   0:00 /init
 +...
 +</code>
 +</WRAP>
 +
  • windows/wsl/install.txt
  • 最終更新: 2023/03/15 05:53
  • by ともやん