差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン 次のリビジョン両方とも次のリビジョン | ||
windows:wsl:install [2019/09/14 00:20] – [今後インストールする新しいディストリビューションが WSL 2 を既定のアーキテクチャとするように設定] ともやん | windows:wsl:install [2019/09/15 17:17] – [日本語環境に設定] ともやん | ||
---|---|---|---|
行 9: | 行 9: | ||
</ | </ | ||
====== WSL 2 のインストール ====== | ====== WSL 2 のインストール ====== | ||
+ | 本手順では、WSL 2 上に [[https:// | ||
+ | Fedora ファンとしては、Fedora Rimix for WSL が Fedora 公式ではないのがちょっと残念ではあるが、使い慣れた Fedora が Windows 10 でも使えるのはありがたい。\\ | ||
+ | \\ | ||
+ | 現在 [[https:// | ||
+ | 実は、[[https:// | ||
+ | 無償で利用したい場合は試してみるとよいだろう。\\ | ||
+ | \\ | ||
※ 2019/09/13 現在 Build 18917 以降は **[[windows: | ※ 2019/09/13 現在 Build 18917 以降は **[[windows: | ||
以下の手順は Build 18362 ~ 18980 へ更新しながら検証した。\\ | 以下の手順は Build 18362 ~ 18980 へ更新しながら検証した。\\ | ||
行 363: | 行 370: | ||
<WRAP prewrap 100% #result> | <WRAP prewrap 100% #result> | ||
< | < | ||
- | $ $ sudo dnf update | + | $ sudo dnf update |
Fedora Modular 30 - x86_64 | Fedora Modular 30 - x86_64 | ||
Fedora Modular 30 - x86_64 - Updates | Fedora Modular 30 - x86_64 - Updates | ||
行 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! | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | ===== 日本語環境に設定 ===== | ||
+ | 標準のインストールだと日本語が **□** に文字化けする。\\ | ||
+ | システムロケール設定が **en_US.UTF-8** になっているためである。\\ | ||
+ | < | ||
+ | $ ll | ||
+ | drwxr-xr-x 1 tomoyan tomoyan | ||
+ | drwxr-xr-x 1 tomoyan tomoyan | ||
+ | drwxr-xr-x 1 tomoyan tomoyan | ||
+ | drwxr-xr-x 1 tomoyan tomoyan | ||
+ | drwxr-xr-x 1 tomoyan tomoyan | ||
+ | lrwxrwxrwx 1 tomoyan tomoyan | ||
+ | $ echo $LANG | ||
+ | en_US.UTF-8 | ||
+ | </ | ||
+ | |||
+ | 日本語ランゲージパックをインストールすると文字化けが解消される。\\ | ||
+ | **sudo dnf install langpacks-ja** を実行する。\\ | ||
+ | <WRAP prewrap 100% #result> | ||
+ | < | ||
+ | $ sudo dnf install langpacks-ja | ||
+ | Fedora Modular 30 - x86_64 | ||
+ | Fedora Modular 30 - x86_64 - Updates | ||
+ | Fedora 30 - x86_64 - Updates | ||
+ | Fedora 30 - x86_64 | ||
+ | whitewaterfoundry_wslu | ||
+ | Dependencies resolved. | ||
+ | ==================================================================================== | ||
+ | | ||
+ | ==================================================================================== | ||
+ | Installing: | ||
+ | | ||
+ | Installing dependencies: | ||
+ | | ||
+ | Installing weak dependencies: | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Transaction Summary | ||
+ | ==================================================================================== | ||
+ | Install | ||
+ | |||
+ | 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 | ||
+ | (2/5): glibc-langpack-ja-2.29-22.fc30.x86_64.rpm | ||
+ | (3/5): langpacks-ja-1.0-17.fc30.noarch.rpm | ||
+ | (4/5): google-noto-sans-cjk-ttc-fonts-20190416-2.fc | ||
+ | (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 | ||
+ | Installing | ||
+ | Installing | ||
+ | Installing | ||
+ | Installing | ||
+ | Installing | ||
+ | Running scriptlet: langpacks-ja-1.0-17.fc30.noarch | ||
+ | Verifying | ||
+ | Verifying | ||
+ | Verifying | ||
+ | Verifying | ||
+ | Verifying | ||
+ | |||
+ | 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! | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | システムロケール設定を **ja_JP.UTF-8** に変更する。\\ | ||
+ | < | ||
+ | $ 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 | ||
+ | </ | ||
+ | システムは、initd システム (PID 1) なので systemd として起動されていません。操作できません。\\ | ||
+ | バスへの接続に失敗しました: | ||
+ | \\ | ||
+ | 本物の Fedora の PID 1 は **/ | ||
+ | <WRAP prewrap 100%> | ||
+ | < | ||
+ | $ ps aux | ||
+ | USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND | ||
+ | root | ||
+ | root | ||
+ | ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | 現状の WSL 2 では PID 1 は **/init** である。\\ | ||
+ | <WRAP prewrap 100%> | ||
+ | < | ||
+ | $ ps aux | ||
+ | USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND | ||
+ | root | ||
+ | root | ||
+ | ... | ||
+ | </ | ||
+ | </ | ||
+ |