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
* command not found
* Update WSL/troubleshooting.md
* Update WSL/troubleshooting.md
* Apply suggestions from code review
* Update troubleshooting.md
* Add release notes for 20226
* On branch edburns-msft-diskpart-expand-improvement Fixes#951 resize improvement (#952)
modified: WSL/compare-versions.md
* Update virtualization not enabled error section (#949)
Updating section describing what to do when virtualization not enabled to include error message and error code.
* Fix typo (whats → what's) (#947)
* Updated troubleshooting.md (#958)
* Remove admin recommendation where unnecessary (#966)
* Capitalize “Linux” in doc title (#962)
* Replace kernel link (#967)
* Adding more emphasis one when to Restart through the process (#961)
* Update install-win10.md (#942)
Co-authored-by: Canhua Li <[email protected]>
Co-authored-by: Craig Loewen <[email protected]>
Co-authored-by: Matt Wojciakowski <[email protected]>
Co-authored-by: Ben Hillis <[email protected]>
Co-authored-by: Ed Burns <[email protected]>
Co-authored-by: Ben Randall <[email protected]>
Co-authored-by: Andrea Spadaccini <[email protected]>
Co-authored-by: Adolfo Jayme-Barrientos <[email protected]>
Co-authored-by: Pablo Espinosa <[email protected]>
Co-authored-by: Miklos Cari <[email protected]>
Copy file name to clipboardExpand all lines: WSL/compare-versions.md
+51-15Lines changed: 51 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Comparing WSL 2 and WSL 1
3
-
description: Compare version 1 and version 2 of the Windows Subsystem for Linux. Learn whats new in WSL 2 - actual Linux kernel, faster speed, full system call compatibility. WSL 1 works better if your storing files across operating file systems. You can expand the size of your WSL 2 Virtual Hardware Disk (VHD).
description: Compare version 1 and version 2 of the Windows Subsystem for Linux. Learn whats new in WSL 2 - actual Linux kernel, faster speed, full system call compatibility. WSL 1 works better if your storing files across operating file systems. You can expand the size of your WSL 2 Virtual Hard Disk (VHD).
@@ -51,7 +51,7 @@ WSL 2 is only available in Windows 10, Version 1903, Build 18362 or higher. Chec
51
51
> [!NOTE]
52
52
> WSL 2 will work with [VMware 15.5.5+](https://blogs.vmware.com/workstation/2020/05/vmware-workstation-now-supports-hyper-v-mode.html) and [VirtualBox 6+](https://www.virtualbox.org/wiki/Changelog-6.0). Learn more in our [WSL 2 FAQs.](./wsl2-faq.md#will-i-be-able-to-run-wsl-2-and-other-3rd-party-virtualization-tools-such-as-vmware-or-virtualbox)
53
53
54
-
## Whats new in WSL 2
54
+
## What's new in WSL 2
55
55
56
56
WSL 2 is a major overhaul of the underlying architecture and uses virtualization technology and a Linux kernel to enable new features. The primary goals of this update are to increase file system performance and add full system call compatibility.
WSL 2 distributions currently cannot reach IPv6-only addresses. We are working on adding this feature.
157
157
158
-
## Expanding the size of your WSL 2 Virtual Hardware Disk
158
+
## Expanding the size of your WSL 2 Virtual Hard Disk
159
159
160
-
WSL 2 uses a Virtual Hardware Disk (VHD) to store your Linux files. If you reach its max size you may need to expand it.
160
+
WSL 2 uses a Virtual Hard Disk (VHD) to store your Linux files. In WSL 2, a VHD is represented on your Windows hard drive as a *.vhdx* file.
161
161
162
-
The WSL 2 VHD uses the ext4 file system. This VHD automatically resizes to meet your storage needs and has an initial maximum size of 256GB. If your distribution grows in size to be greater than 256GB, you will see errors stating that you've run out of disk space. You can fix this error by expanding the VHD size.
162
+
The WSL 2 VHD uses the ext4 file system. This VHD automatically resizes to meet your storage needs and has an initial maximum size of 256GB. If the storage space required by your Linux files exceeds this size you may need to expand it. If your distribution grows in size to be greater than 256GB, you will see errors stating that you've run out of disk space. You can fix this error by expanding the VHD size.
163
163
164
164
To expand your maximum VHD size beyond 256GB:
165
165
@@ -174,18 +174,54 @@ To expand your maximum VHD size beyond 256GB:
174
174
175
175
4. Resize your WSL 2 VHD by completing the following commands:
176
176
- Open Windows Command Prompt with admin privileges and enter:
177
-
-`diskpart`
178
-
-`Select vdisk file="<pathToVHD>"`
179
-
-`expand vdisk maximum="<sizeInMegaBytes>"`
177
+
178
+
```powershell
179
+
diskpart
180
+
DISKPART> Select vdisk file="<pathToVHD>"
181
+
DISKPART> detail vdisk
182
+
```
183
+
184
+
- Examine the output of the **detail** command. The output will include a value for **Virtual size**. This is the current maximum. Convert this value to megabytes. The new value after resizing must be greater than this value. For example, if the **detail** output shows **Virtual size: 256 GB**, then you must specify a value greater than **256000**. Once you have your new size in megabytes, enter the following command in **diskpart**:
185
+
186
+
```powershell
187
+
DISKPART> expand vdisk maximum=<sizeInMegaBytes>
188
+
```
189
+
190
+
- Exit **diskpart**
191
+
192
+
```powershell
193
+
DISKPART> exit
194
+
```
180
195
181
196
5. Launch your WSL distribution (Ubuntu, for example).
182
197
183
-
6. Make WSL aware that it can expand its file system's size by running these commands from your Linux distribution command line:
184
-
-`sudo mount -t devtmpfs none /dev`
185
-
-`mount | grep ext4`
186
-
- Copy the name of this entry, which will look like: `/dev/sdXX` (with the X representing any other character)
187
-
-`sudo resize2fs /dev/sdXX`
188
-
- Use the value you copied earlier. You may also need to install resize2fs: `apt install resize2fs`
198
+
6. Make WSL aware that it can expand its file system's size by running these commands from your Linux distribution command line.
199
+
200
+
> [!NOTE]
201
+
> You may see this message in response to the first **mount** command: **/dev: none already mounted on /dev**. This message can safely be ignored.
202
+
203
+
```powershell
204
+
sudo mount -t devtmpfs none /dev
205
+
mount | grep ext4
206
+
```
207
+
208
+
Copy the name of this entry, which will look like: `/dev/sdX` (with the X representing any other character). In the following example the value of **X** is **b**:
209
+
210
+
```powershell
211
+
sudo resize2fs /dev/sdb <sizeInMegabytes>M
212
+
```
213
+
214
+
> [!NOTE]
215
+
> You may need to install **resize2fs**. If so, you can use this command to install it: `sudo apt install resize2fs`.
216
+
217
+
The output will look similar to the following:
218
+
219
+
```bash
220
+
resize2fs 1.44.1 (24-Mar-2018)
221
+
Filesystem at /dev/sdb is mounted on /; on-line resizing required
222
+
old_desc_blocks = 32, new_desc_blocks = 38
223
+
The filesystem on /dev/sdb is now 78643200 (4k) blocks long.
224
+
```
189
225
190
226
> [!NOTE]
191
227
> In general do not modify, move, or access the WSL related files located inside of your AppData folder using Windows tools or editors. Doing so could cause your Linux distribution to become corrupted.
We recommend now moving on to step #2, updating to WSL 2, but if you wish to only install WSL 1, you can now restart your machine and move on to [Step 6 - Install your Linux distribution of choice](./install-win10.md#step-6---install-your-linux-distribution-of-choice). To update to WSL 2, wait to restart your machine and move on to the next step.
26
+
We recommend now moving on to step #2, updating to WSL 2, but if you wish to only install WSL 1, you can now **restart** your machine and move on to [Step 6 - Install your Linux distribution of choice](./install-win10.md#step-6---install-your-linux-distribution-of-choice). To update to WSL 2, **wait to restart** your machine and move on to the next step.
27
27
28
28
## Step 2 - Update to WSL 2
29
29
@@ -69,7 +69,7 @@ Once the installation is complete, move on to the next step - setting WSL 2 as y
69
69
70
70
## Step 5 - Set WSL 2 as your default version
71
71
72
-
Open PowerShell as Administrator and run this command to set WSL 2 as the default version when installing a new Linux distribution:
72
+
Open PowerShell and run this command to set WSL 2 as the default version when installing a new Linux distribution:
73
73
74
74
```powershell
75
75
wsl --set-default-version 2
@@ -155,7 +155,7 @@ Below are related errors and suggested fixes. Refer to the [WSL troubleshooting
155
155
156
156
-**Installation failed with error 0x80070003**
157
157
- The Windows Subsystem for Linux only runs on your system drive (usually this is your `C:` drive). Make sure that distributions are stored on your system drive:
158
-
- Open **Settings** -> **Storage** -> **More Storage Settings: Change where new content is saved**
158
+
- Open **Settings** -> **System --> **Storage** -> **More Storage Settings: Change where new content is saved**
159
159

160
160
161
161
-**WslRegisterDistribution failed with error 0x8007019e**
@@ -193,4 +193,4 @@ Below are related errors and suggested fixes. Refer to the [WSL troubleshooting
193
193
3. After you enabled WSL, a reboot is required for it to take effect, reboot your machine and try again.
194
194
195
195
-**Error: WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel .**
196
-
- If the Linux kernel package is missing in the %SystemRoot%\system32\lxss\tools folder, you will encounter this error. Resolve it by installing the Linux kernel update MSI package in step #4 of these installation instructions. You may need to uninstall the MSI from ['Add or Remove Programs'](ms-settings:appsfeatures-app), and install it again.
196
+
- If the Linux kernel package is missing in the %SystemRoot%\system32\lxss\tools folder, you will encounter this error. Resolve it by installing the Linux kernel update MSI package in step #4 of these installation instructions. You may need to uninstall the MSI from ['Add or Remove Programs'](ms-settings:appsfeatures-app), and install it again.
Copy file name to clipboardExpand all lines: WSL/release-notes.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,11 @@ ms.localizationpriority: high
10
10
11
11
# Release Notes for Windows Subsystem for Linux
12
12
13
+
## Build 20226
14
+
For general Windows information on build 20226 visit the [Windows blog](https://blogs.windows.com/windows-insider/2020/09/10/announcing-windows-10-insider-preview-build-20226/).
15
+
16
+
* Fix crash in LxssManager service. [GH 5902]
17
+
13
18
## Build 20211
14
19
For general Windows information on build 20211 visit the [Windows blog](https://blogs.windows.com/windows-insider/2020/09/10/announcing-windows-10-insider-preview-build-20211/).
Copy file name to clipboardExpand all lines: WSL/troubleshooting.md
+59-24Lines changed: 59 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,22 +9,21 @@ ms.localizationpriority: high
9
9
10
10
# Troubleshooting Windows Subsystem for Linux
11
11
12
-
For support with issues related to WSL, please see our GitHub repo: https://github.com/Microsoft/wsl/issues
12
+
For support with issues related to WSL, please see our [WSL product repo on GitHub](https://github.com/Microsoft/wsl/issues).
13
13
14
14
## Search for any existing issues related to your problem
15
15
16
-
For technical issues, use the product repo: https://github.com/Microsoft/wsl/issues
16
+
For technical issues, use the [product repo](https://github.com/Microsoft/wsl/issues).
17
17
18
-
For issues related to the contents of this documentation, use the docs repo: https://github.com/MicrosoftDocs/wsl/issues
18
+
For issues related to the contents of this documentation, use the [docs repo](https://github.com/MicrosoftDocs/wsl/issues).
19
19
20
20
## Submit a bug report
21
21
22
22
For bugs related to WSL functions or features, file an issue in the product repo: https://github.com/Microsoft/wsl/issues
23
23
24
24
## Submit a feature request
25
25
26
-
To request a new feature related to WSL functionality or compatibility, file an issue in the product repo:
27
-
https://github.com/Microsoft/wsl/issues
26
+
To request a new feature related to WSL functionality or compatibility, [file an issue in the product repo](https://github.com/Microsoft/wsl/issues).
28
27
29
28
## Contribute to the docs
30
29
@@ -36,42 +35,46 @@ Lastly, if your issue is related to the Windows Terminal, Windows Console, or th
36
35
37
36
## Common issues
38
37
39
-
### I'm on Windows 10 version 1903 and I still do not see options for WSL 2.
38
+
### I'm on Windows 10 version 1903 and I still do not see options for WSL 2
40
39
41
-
This is likely because your machine has not yet taken the backport for WSL 2. The simplest way to resolve this is by going to Windows Settings and clicking 'Check for Updates' to install the latest updates on your system. You can view the full instructions on taking the backport[here](https://devblogs.microsoft.com/commandline/wsl-2-support-is-coming-to-windows-10-versions-1903-and-1909/#how-do-i-get-it).
40
+
This is likely because your machine has not yet taken the backport for WSL 2. The simplest way to resolve this is by going to Windows Settings and clicking 'Check for Updates' to install the latest updates on your system. See [the full instructions on taking the backport](https://devblogs.microsoft.com/commandline/wsl-2-support-is-coming-to-windows-10-versions-1903-and-1909/#how-do-i-get-it).
42
41
43
-
If you hit 'Check for Updates' and still do not receive the update you can install KB KB4566116 manually by [following this link](https://www.catalog.update.microsoft.com/Search.aspx?q=KB4566116).
42
+
If you hit 'Check for Updates' and still do not receive the update you can [install KB KB4566116 manually](https://www.catalog.update.microsoft.com/Search.aspx?q=KB4566116).
44
43
45
44
### Error: 0x1bc when `wsl --set-default-version 2`
45
+
46
46
This may happen when 'Display Language' or 'System Locale' setting is not English.
47
-
```
47
+
48
+
```powershell
48
49
wsl --set-default-version 2
49
50
Error: 0x1bc
50
51
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
51
52
```
52
53
53
54
THe actual error for `0x1bc` is:
54
-
```
55
+
56
+
```powershell
55
57
WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel
56
58
```
57
59
58
60
For more information, please refer to issue [5749](https://github.com/microsoft/WSL/issues/5749)
59
61
60
-
61
62
### Cannot access WSL files from Windows
63
+
62
64
A 9p protocol file server provides the service on the Linux side to allow Windows to access the Linux file system. If you cannot access WSL using `\\wsl$` on Windows, it could be because 9P did not start correctly.
63
65
64
-
To check this, you can check the start up logs using: `dmesg |grep 9p`, and this will show you any errors. A successfull output looks like the following:
66
+
To check this, you can check the start up logs using: `dmesg |grep 9p`, and this will show you any errors. A successfull output looks like the following:
65
67
66
-
```
68
+
```bash
67
69
[ 0.363323] 9p: Installing v9fs 9p2000 file system support
68
70
[ 0.363336] FS-Cache: Netfs '9p' registered for caching
69
71
[ 0.398989] 9pnet: Installing 9P2000 support
70
72
```
71
73
72
74
Please see [this Github thread](https://github.com/microsoft/wsl/issues/5307) for further discussion on this issue.
73
75
74
-
### Can't start WSL 2 distro and only see 'WSL 2' in output
76
+
### Can't start WSL 2 distribution and only see 'WSL 2' in output
77
+
75
78
If your display language is not English, then it is possible you are seeing a truncated version of an error text.
76
79
77
80
```powershell
@@ -81,17 +84,49 @@ WSL 2
81
84
82
85
To resolve this issue, please visit `https://aka.ms/wsl2kernel` and install the kernel manually by following the directions on that doc page.
83
86
84
-
### Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
87
+
### `command not found` when executing windows .exe in linux
85
88
86
-
1. Check the [Hyper-V system requirements](/windows-server/virtualization/hyper-v/system-requirements-for-hyper-v-on-windows#:~:text=on%20Windows%20Server.-,General%20requirements,the%20processor%20must%20have%20SLAT.)
87
-
2. If your machine is a VM, please enable [nested virtualization](./wsl2-faq.md#can-i-run-wsl-2-in-a-virtual-machine) manually. Launch powershell with admin, and run:
89
+
Users can run Windows executables like notepad.exe directly from Linux. Sometimes, you may hit "command not found" like below:
3. Please follow guidelines from your PC's manufacturer on how to enable virtualization. In general, this can involve using the system BIOS to ensure that these features are enabled on your CPU.
94
-
4. Restart your machine after enabling the `Virtual Machine Platform` optional component.
96
+
If there are no win32 paths in your $PATH, interop isn't going to find the .exe.
97
+
You can verify it by running `echo $PATH` in Linux. It's expected that you will see a win32 path (for example, /mnt/c/Windows) in the output.
98
+
If you can't see any Windows paths then most likely your PATH is being overwritten by your Linux shell.
99
+
100
+
Here is a an example that /etc/profile on Debian contributed to the problem:
The correct way on Debian is to remove above lines.
111
+
You may also append $PATH during the assignment like below, but this lead to some [other problems](https://salsa.debian.org/debian/WSL/-/commit/7611edba482fd0b3f67143aa0fc1e2cc1d4100a6) with WSL and VSCode..
112
+
113
+
For more information, see issue [5296](https://github.com/microsoft/WSL/issues/5296) and issue [5779](https://github.com/microsoft/WSL/issues/5779).
114
+
115
+
### Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS
116
+
117
+
Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
118
+
119
+
1. Check the [Hyper-V system requirements](/windows-server/virtualization/hyper-v/system-requirements-for-hyper-v-on-windows#:~:text=on%20Windows%20Server.-,General%20requirements,the%20processor%20must%20have%20SLAT.)
120
+
121
+
2. If your machine is a VM, please enable [nested virtualization](./wsl2-faq.md#can-i-run-wsl-2-in-a-virtual-machine) manually. Launch powershell with admin, and run:
3. Please follow guidelines from your PC's manufacturer on how to enable virtualization. In general, this can involve using the system BIOS to ensure that these features are enabled on your CPU. Instructions for this process can vary from machine to machine, please see [this article](https://www.bleepingcomputer.com/tutorials/how-to-enable-cpu-virtualization-in-your-computer-bios/) from Bleeping Computer for an example.
128
+
129
+
4. Restart your machine after enabling the `Virtual Machine Platform` optional component.
95
130
96
131
### Bash loses network connectivity once connected to a VPN
97
132
@@ -309,7 +344,7 @@ This error is related to being in a bad install state. Please complete the follo
@@ -318,10 +353,10 @@ Permissions 0777 for '/home/artur/.ssh/private-key.pem' are too open.
318
353
319
354
To fix this, append the following to the the ```/etc/wsl.conf``` file:
320
355
321
-
```
356
+
```bash
322
357
[automount]
323
358
enabled = true
324
359
options = metadata,uid=1000,gid=1000,umask=0022
325
360
```
326
361
327
-
Please note that adding this command will include metadata and modify the file permissions on the Windows files seen from WSL. Please see the [File System Permissions](./file-permissions.md) for more information.
362
+
Please note that adding this command will include metadata and modify the file permissions on the Windows files seen from WSL. Please see the [File System Permissions](./file-permissions.md) for more information.
0 commit comments