How to Install WSL2 on Windows 10
WSL Installation
You can now install everything you need to run Windows Subsystem for Linux (WSL) by entering this command in an administrator PowerShell or Windows Command Prompt and then restarting your machine.
Pre Req: You need to have at least Windows 10 build 18917.
How to Check?
Check that in My computer -> Properties
Windows_10_build |
wsl --install -d Ubuntu
Install_ubuntu_wsl |
This command will
enable the required optional components, download the latest Linux kernel, set
WSL 2 as your default, and install a Linux distribution for you. By default,
the installed Linux distribution will be Ubuntu. This can be changed using the
-d flag.
·
To see a list of
available Linux distributions available for download through the online store,
enter: wsl --list --online or wsl -l -o.
Install_ubuntu_wsl1 |
To set the default version to WSL 1 or WSL 2 when a new Linux
distribution is installed, use the command: wsl
--set-default-version <Version#>
, replacing <Version#>
with either 1 or 2.
set_default_wsl2_version |
No comments