最終更新:2023-04-06 (木) 00:37:14 (386d)  

wsl --install
Top / wsl --install

WSLに必要なものをコマンド1つでインストールする機能

デフォルトでUbuntuをインストール

https://learn.microsoft.com/ja-jp/windows/wsl/install

https://devblogs.microsoft.com/commandline/install-wsl-with-a-single-command-now-available-in-windows-10-version-2004-and-higher/

対応

いままで

処理

  • --install コマンドでは、次のアクションが実行されます。
    • オプションのWSLおよび仮想マシンプラットフォームのコンポーネントを有効にする
    • 最新のLinuxカーネルをダウンロードしてインストールする
    • WSL 2を既定値として設定する
    • Ubuntu Linux ディストリビューションをダウンロードしてインストールする (再起動が必要になる場合があります)

Ubuntuを入れる

参考

Windows 11/22H2

  • インストール中: 仮想マシン プラットフォーム
    仮想マシン プラットフォーム はインストールされました。
    インストール中: Linux 用 Windows サブシステム
    Linux 用 Windows サブシステム はインストールされました。
    インストール中: Ubuntu
    Ubuntu はインストールされました。
    要求された操作は正常に終了しました。変更を有効にするには、システムを再起動する必要があります。

Windows 10/22H2

  • インストール中: 仮想マシン プラットフォーム
    仮想マシン プラットフォーム はインストールされました。
    インストール中: Linux 用 Windows サブシステム
    Linux 用 Windows サブシステム  はインストールされました。
    インストール中: Linux 用 Windows サブシステム
    Linux 用 Windows サブシステム  はインストールされました。
    インストール中: Ubuntu
    Ubuntu はインストールされました。
    要求された操作は正常に終了しました。変更を有効にするには、システムを再起動する必要があります。
    Installing, this may take a few minutes...
    Please create a default UNIX user account. The username does not need to match your Windows username.
    For more information visit: https://aka.ms/wslusers
    Enter new UNIX username: user
    New password:
    Retype new password:
    passwd: password updated successfully
    Installation successful!
    To run a command as administrator (user "root"), use "sudo <command>".
    See "man sudo_root" for details.
    
    Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.15.74.2-microsoft-standard-WSL2 x86_64)
    
     * Documentation:  https://help.ubuntu.com
     * Management:     https://landscape.canonical.com
     * Support:        https://ubuntu.com/advantage
    
    This message is shown once a day. To disable it please create the
    /home/user/.hushlogin file.

関連