両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン 次のリビジョン両方とも次のリビジョン |
windows:wsl:install [2019/09/13 23:55] – [Windows Subsystem for Linux 2 (WSL 2) を使用するようにディストリビューションを設定] ともやん | windows:wsl:install [2019/10/30 13:10] – ともやん |
---|
</html> | </html> |
====== WSL 2 のインストール ====== | ====== WSL 2 のインストール ====== |
| 本手順では、WSL 2 上に [[https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL|Fedora Rimix for WSL]] ディストリビューションをインストールする。\\ |
| Fedora ファンとしては、Fedora Remix for WSL が Fedora 公式ではないのがちょっと残念ではあるが、使い慣れた Fedora が Windows 10 でも使えるのはありがたい。\\ |
| \\ |
| 現在 [[https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL|Fedora Remix 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 へ更新しながら検証した。\\ |
<code> | <code> |
PS > wsl --set-default-version 2 | PS > wsl --set-default-version 2 |
| WSL 2 との主な違いについては、https://aka.ms/wsl2 を参照してください |
</code> | </code> |
| |
| ===== 現在のディストリビューションが使用している WSL のバージョンを確認 ===== |
| **wsl -l -v** を実行して、現在のディストリビューションが使用している WSL のバージョンを確認する。\\ |
| <code> |
| PS > wsl -l -v |
| NAME STATE VERSION |
| * fedoraremix Stopped 2 |
| </code> |
| |
| 以上で WSL 2 を使用する準備が整いました。\\ |
| |
| ===== bash の起動確認 ===== |
| この状態でいつでも WSL 2 の環境にアクセスできる。\\ |
| bash の起動は 1 秒も掛からなかった。非常に高速である。\\ |
| <code> |
| PS > bash |
| |
| $ uname -a |
| Linux Cmon 4.19.67-microsoft-standard #1 SMP Sun Aug 18 13:37:54 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
| |
| $ cat /etc/redhat-release |
| Generic release 30 (Generic) |
| |
| $ cd / |
| $ ls -al |
| total 684 |
| drwxr-xr-x 19 root root 4096 Sep 14 00:01 . |
| drwxr-xr-x 19 root root 4096 Sep 14 00:01 .. |
| lrwxrwxrwx 1 root root 7 Feb 11 2019 bin -> usr/bin |
| dr-xr-xr-x 2 root root 4096 Feb 11 2019 boot |
| drwx------ 3 root root 4096 Jun 16 23:09 builddir |
| drwxr-xr-x 7 root root 2740 Sep 14 00:01 dev |
| drwxr-xr-x 55 root root 4096 Sep 14 00:01 etc |
| drwxr-xr-x 3 root root 4096 Sep 13 18:53 home |
| -rwxr-xr-x 2 root root 623984 Sep 8 23:26 init |
| lrwxrwxrwx 1 root root 7 Feb 11 2019 lib -> usr/lib |
| lrwxrwxrwx 1 root root 9 Feb 11 2019 lib64 -> usr/lib64 |
| drwx------ 2 root root 16384 Apr 11 01:35 lost+found |
| drwxr-xr-x 2 root root 4096 Feb 11 2019 media |
| drwxr-xr-x 3 root root 4096 Sep 13 18:45 mnt |
| drwxr-xr-x 2 root root 4096 Feb 11 2019 opt |
| dr-xr-xr-x 87 root root 0 Sep 14 00:01 proc |
| dr-xr-x--- 2 root root 4096 Jun 16 23:10 root |
| drwxr-xr-x 8 root root 160 Sep 14 00:01 run |
| lrwxrwxrwx 1 root root 8 Feb 11 2019 sbin -> usr/sbin |
| drwxr-xr-x 2 root root 4096 Feb 11 2019 srv |
| dr-xr-xr-x 11 root root 0 Sep 13 23:50 sys |
| drwxrwxrwt 3 root root 4096 Feb 11 2019 tmp |
| drwxr-xr-x 12 root root 4096 Jun 16 23:09 usr |
| drwxr-xr-x 18 root root 4096 Jun 16 23:09 var |
| </code> |
| |
| ===== ディストリビューション パッケージの更新 ===== |
| Fedora Rimix for WSL は Fedora 30 相当のようである。\\ |
| **sudo dnf update** を実行してパッケージを更新する。\\ |
| <WRAP prewrap 100% #result> |
| <code> |
| $ sudo dnf update |
| 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 30 - x86_64 - Updates 1.6 MB/s | 20 MB 00:12 |
| Fedora 30 - x86_64 558 kB/s | 70 MB 02:08 |
| whitewaterfoundry_wslu 228 B/s | 833 B 00:03 |
| whitewaterfoundry_wslu 2.8 kB/s | 3.9 kB 00:01 |
| Importing GPG key 0x10735619: |
| Userid : "https://packagecloud.io/whitewaterfoundry/wslu (https://packagecloud.io/docs#gpg_signing) <support@packagecloud.io>" |
| Fingerprint: 90F6 8549 4B52 C0E9 6DA4 B925 0087 4F17 1073 5619 |
| From : https://packagecloud.io/whitewaterfoundry/wslu/gpgkey |
| Is this ok [y/N]: y |
| whitewaterfoundry_wslu 342 B/s | 1.8 kB 00:05 |
| Dependencies resolved. |
| =================================================================================== |
| Package Arch Version Repo Size |
| =================================================================================== |
| Upgrading: |
| NetworkManager x86_64 1:1.16.4-1.fc30 updates 1.8 M |
| NetworkManager-libnm x86_64 1:1.16.4-1.fc30 updates 1.5 M |
| audit x86_64 3.0-0.9.20190507gitf58ec40.fc30 updates 229 k |
| audit-libs x86_64 3.0-0.9.20190507gitf58ec40.fc30 updates 106 k |
| bind-export-libs x86_64 32:9.11.10-1.fc30 updates 1.0 M |
| cryptsetup-libs x86_64 2.2.0-1.fc30 updates 404 k |
| cups-libs x86_64 1:2.2.12-1.fc30 updates 252 k |
| curl x86_64 7.65.3-3.fc30 updates 297 k |
| dbus x86_64 1:1.12.16-1.fc30 updates 11 k |
| dbus-common noarch 1:1.12.16-1.fc30 updates 18 k |
| dbus-libs x86_64 1:1.12.16-1.fc30 updates 147 k |
| dhcp-client x86_64 12:4.3.6-37.fc30 updates 227 k |
| dhcp-common noarch 12:4.3.6-37.fc30 updates 125 k |
| dhcp-libs x86_64 12:4.3.6-37.fc30 updates 63 k |
| dnf noarch 4.2.8-1.fc30 updates 405 k |
| dnf-data noarch 4.2.8-1.fc30 updates 45 k |
| dnf-plugins-core noarch 4.0.9-1.fc30 updates 28 k |
| dnf-yum noarch 4.2.8-1.fc30 updates 42 k |
| elfutils x86_64 0.177-1.fc30 updates 300 k |
| elfutils-default-yama-scope noarch 0.177-1.fc30 updates 16 k |
| elfutils-libelf x86_64 0.177-1.fc30 updates 177 k |
| elfutils-libs x86_64 0.177-1.fc30 updates 264 k |
| expat x86_64 2.2.7-1.fc30 updates 92 k |
| fedora-gpg-keys noarch 30-2 updates 104 k |
| fedora-repos noarch 30-2 updates 9.5 k |
| file x86_64 5.36-4.fc30 updates 48 k |
| file-libs x86_64 5.36-4.fc30 updates 544 k |
| gdb-headless x86_64 8.3-6.fc30 updates 3.4 M |
| glib2 x86_64 2.60.7-1.fc30 updates 2.6 M |
| glibc x86_64 2.29-22.fc30 updates 4.0 M |
| glibc-common x86_64 2.29-22.fc30 updates 838 k |
| glibc-langpack-en x86_64 2.29-22.fc30 updates 818 k |
| glibc-minimal-langpack x86_64 2.29-22.fc30 updates 47 k |
| gnupg2 x86_64 2.2.17-1.fc30 updates 2.4 M |
| graphite2 x86_64 1.3.13-1.fc30 updates 95 k |
| iproute x86_64 5.2.0-1.fc30 updates 572 k |
| iptables-libs x86_64 1.8.2-3.fc30 updates 49 k |
| kmod-libs x86_64 26-3.fc30 updates 58 k |
| less x86_64 551-1.fc30 updates 144 k |
| libXi x86_64 1.7.10-1.fc30 updates 36 k |
| libblkid x86_64 2.33.2-2.fc30 updates 144 k |
| libcurl x86_64 7.65.3-3.fc30 updates 251 k |
| libdnf x86_64 0.35.2-1.fc30 updates 574 k |
| libfdisk x86_64 2.33.2-2.fc30 updates 193 k |
| libgcc x86_64 9.2.1-1.fc30 updates 91 k |
| libgcrypt x86_64 1.8.5-1.fc30 updates 450 k |
| libgomp x86_64 9.2.1-1.fc30 updates 220 k |
| libgs x86_64 9.26-5.fc30 updates 3.0 M |
| libmodulemd1 x86_64 1.8.15-3.fc30.1 updates 161 k |
| libmount x86_64 2.33.2-2.fc30 updates 167 k |
| libnghttp2 x86_64 1.39.2-1.fc30 updates 69 k |
| librepo x86_64 1.10.5-1.fc30 updates 88 k |
| libreport-filesystem noarch 2.10.1-1.fc30 updates 13 k |
| librsvg2 x86_64 2.45.90-1.fc30 updates 2.1 M |
| libselinux x86_64 2.9-3.1.fc30 updates 78 k |
| libsmartcols x86_64 2.33.2-2.fc30 updates 107 k |
| libsolv x86_64 0.7.5-1.fc30 updates 378 k |
| libssh x86_64 0.9.0-5.fc30 updates 226 k |
| libstdc++ x86_64 9.2.1-1.fc30 updates 578 k |
| libtiff x86_64 4.0.10-5.fc30 updates 167 k |
| libuuid x86_64 2.33.2-2.fc30 updates 26 k |
| libwebp x86_64 1.0.3-1.fc30 updates 255 k |
| libxcrypt x86_64 4.4.8-1.fc30 updates 122 k |
| libzstd x86_64 1.4.2-1.fc30 updates 257 k |
| lz4-libs x86_64 1.9.1-1.fc30 updates 62 k |
| openssh x86_64 8.0p1-5.fc30 updates 405 k |
| openssh-clients x86_64 8.0p1-5.fc30 updates 555 k |
| openssh-server x86_64 8.0p1-5.fc30 updates 394 k |
| openssl-libs x86_64 1:1.1.1c-6.fc30 updates 1.4 M |
| pango x86_64 1.43.0-4.fc30 updates 260 k |
| patch x86_64 2.7.6-11.fc30 updates 126 k |
| pcre2 x86_64 10.33-13.fc30 updates 248 k |
| python-pip-wheel noarch 19.0.3-3.fc30 updates 1.1 M |
| python3 x86_64 3.7.4-1.fc30 updates 36 k |
| python3-dnf noarch 4.2.8-1.fc30 updates 413 k |
| python3-dnf-plugins-core noarch 4.0.9-1.fc30 updates 160 k |
| python3-hawkey x86_64 0.35.2-1.fc30 updates 87 k |
| python3-libdnf x86_64 0.35.2-1.fc30 updates 671 k |
| python3-libs x86_64 3.7.4-1.fc30 updates 7.7 M |
| python3-rpm x86_64 4.14.2.1-5.fc30 updates 65 k |
| qt5-srpm-macros noarch 5.12.4-1.fc30 updates 8.9 k |
| redhat-rpm-config noarch 130-1.fc30 updates 63 k |
| rpm x86_64 4.14.2.1-5.fc30 updates 479 k |
| rpm-build x86_64 4.14.2.1-5.fc30 updates 106 k |
| rpm-build-libs x86_64 4.14.2.1-5.fc30 updates 86 k |
| rpm-libs x86_64 4.14.2.1-5.fc30 updates 264 k |
| rpm-sign-libs x86_64 4.14.2.1-5.fc30 updates 23 k |
| rust-srpm-macros noarch 10-1.fc30 updates 9.5 k |
| shared-mime-info x86_64 1.13.1-1.fc30 updates 316 k |
| sqlite-libs x86_64 3.26.0-6.fc30 updates 537 k |
| systemd x86_64 241-12.git1e19bcd.fc30 updates 3.8 M |
| systemd-libs x86_64 241-12.git1e19bcd.fc30 updates 504 k |
| systemd-pam x86_64 241-12.git1e19bcd.fc30 updates 157 k |
| systemd-rpm-macros noarch 241-12.git1e19bcd.fc30 updates 22 k |
| tzdata noarch 2019b-1.fc30 updates 425 k |
| util-linux x86_64 2.33.2-2.fc30 updates 2.4 M |
| vim-minimal x86_64 2:8.1.1912-1.fc30 updates 592 k |
| zlib x86_64 1.2.11-18.fc30 updates 91 k |
| zstd x86_64 1.4.2-1.fc30 updates 371 k |
| wslu noarch 2.3.1-1 whitewaterfoundry_wslu |
| 249 k |
| Installing dependencies: |
| libevent x86_64 2.1.8-7.fc30 updates 231 k |
| libssh-config noarch 0.9.0-5.fc30 updates 11 k |
| linux-atm-libs x86_64 2.5.1-25.fc30 updates 35 k |
| openssl x86_64 1:1.1.1c-6.fc30 updates 634 k |
| whois-nls noarch 5.5.1-1.fc30 updates 33 k |
| xkeyboard-config noarch 2.26-2.fc30 updates 837 k |
| libsecret x86_64 0.18.8-1.fc30 fedora 152 k |
| unbound-libs x86_64 1.8.3-4.fc30 fedora 465 k |
| Installing weak dependencies: |
| gnupg2-smime x86_64 2.2.17-1.fc30 updates 251 k |
| iproute-tc x86_64 5.2.0-1.fc30 updates 389 k |
| libxcrypt-compat x86_64 4.4.8-1.fc30 updates 96 k |
| mkpasswd x86_64 5.5.1-1.fc30 updates 39 k |
| python3-pip noarch 19.0.3-3.fc30 updates 1.8 M |
| rpm-plugin-systemd-inhibit x86_64 4.14.2.1-5.fc30 updates 19 k |
| deltarpm x86_64 3.6-29.fc30 fedora 77 k |
| libxkbcommon x86_64 0.8.3-1.fc30 fedora 108 k |
| openssl-pkcs11 x86_64 0.4.10-1.fc30 fedora 60 k |
| pinentry x86_64 1.1.0-5.fc30 fedora 90 k |
| python3-dbus x86_64 1.2.8-5.fc30 fedora 127 k |
| python3-setuptools noarch 40.8.0-1.fc30 fedora 636 k |
| python3-unbound x86_64 1.8.3-4.fc30 fedora 96 k |
| |
| Transaction Summary |
| =================================================================================== |
| Install 21 Packages |
| Upgrade 100 Packages |
| |
| Total download size: 63 M |
| 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> |
| </WRAP> |
| |
| |