You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: WSL/wsl2-install.md
+14-12Lines changed: 14 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,16 +23,11 @@ To install and start using WSL 2 complete the following steps:
23
23
24
24
## Enable the 'Virtual Machine Platform' optional component and make sure WSL is enabled
25
25
26
-
To enable the 'Virtual Machine Platform' component open PowerShell as an administrator and run the command below. If you are installing WSL for the first time then select 'No' when prompted for a restart, as you will need to restart your machine anyway after installing the 'Windows Subsystem for Linux' optional component.
26
+
You will need to make sure that you have both the Windows Subsystem for Linux and the Virtual Machine Platform optional components installed. You can do that by running the following command in PowerShell:
You will also need to make sure that the Windows Subsystem for Linux optional component is enabled. You can do this by running the following command from a PowerShell window with administrator privileges:
Please restart your machine to finish installing both components.
@@ -42,15 +37,19 @@ Please restart your machine to finish installing both components.
42
37
43
38
If you do not have a Linux distro installed, please refer to the [Install on Windows 10](./install-win10.md#install-your-linux-distribution-of-choice) docs page for instructions on installing one.
44
39
45
-
In PowerShell run:
40
+
To set a distro please run:
46
41
47
-
`wsl --set-version <Distro> 2`
42
+
```
43
+
wsl --set-version <Distro> 2
44
+
```
48
45
49
46
and make sure to replace `<Distro>` with the actual name of your distro. (You can find these with the command: `wsl -l`). You can change back to WSL 1 at anytime by running the same command as above but replacing the '2' with a '1'.
50
47
51
48
Additionally, if you want to make WSL 2 your default architecture you can do so with this command:
52
49
53
-
`wsl --set-default-version 2`
50
+
```
51
+
wsl --set-default-version 2`
52
+
```
54
53
55
54
This will make any new distro that you install be initialized as a WSL 2 distro.
56
55
@@ -73,4 +72,7 @@ Below are related errors and suggested fixes when installing WSL 2. Please refer
73
72
* Please make sure that you have the Windows Subsystem for Linux enabled, and that you're using Windows Build version 18917 or higher. To enable WSL run this command in a Powershell prompt with admin privileges: `Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux`. You can find the full WSL install instructions [here](./install-win10.md).
74
73
75
74
***The requested operation could not be completed due to a virtual disk system limitation. Virtual hard disk files must be uncompressed and unencrypted and must not be sparse.**
76
-
* Please check [WSL Github thread #4103](https://github.com/microsoft/WSL/issues/4103) where this issue is being tracked for updated information.
75
+
* Please check [WSL Github thread #4103](https://github.com/microsoft/WSL/issues/4103) where this issue is being tracked for updated information.
76
+
77
+
***The term 'wsl' is not recognized as the name of a cmdlet, function, script file, or operable program.**
78
+
* Ensure that the [Windows Subsystem for Linux Optional Component is installed](./wsl2-install.md#enable-the-virtual-machine-platform-optional-component-and-make-sure-wsl-is-enabled).<br> Additionally, if you are using an Arm64 device and running this command from PowerShell, you will receive this error. Instead run `wsl.exe` from [PowerShell Core](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-windows?view=powershell-6), or Command Prompt.
0 commit comments