Skip to content

Commit 59c945c

Browse files
Updated troubleshooting to resolve merge conflicts
2 parents 6f015ea + dee2bf2 commit 59c945c

4 files changed

Lines changed: 66 additions & 31 deletions

File tree

WSL/install-win10.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Open PowerShell as Administrator and run:
2323
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
2424
```
2525

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.
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.
2727

2828
## Step 2 - Update to WSL 2
2929

@@ -69,7 +69,7 @@ Once the installation is complete, move on to the next step - setting WSL 2 as y
6969
7070
## Step 5 - Set WSL 2 as your default version
7171

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:
7373

7474
```powershell
7575
wsl --set-default-version 2
@@ -155,7 +155,7 @@ Below are related errors and suggested fixes. Refer to the [WSL troubleshooting
155155

156156
- **Installation failed with error 0x80070003**
157157
- 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**
159159
![Picture of system settings to install apps on C: drive](media/AppStorage.png)
160160

161161
- **WslRegisterDistribution failed with error 0x8007019e**
@@ -193,4 +193,4 @@ Below are related errors and suggested fixes. Refer to the [WSL troubleshooting
193193
3. After you enabled WSL, a reboot is required for it to take effect, reboot your machine and try again.
194194

195195
- **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.

WSL/troubleshooting.md

Lines changed: 57 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,21 @@ ms.localizationpriority: high
99

1010
# Troubleshooting Windows Subsystem for Linux
1111

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).
1313

1414
## Search for any existing issues related to your problem
1515

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).
1717

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).
1919

2020
## Submit a bug report
2121

2222
For bugs related to WSL functions or features, file an issue in the product repo: https://github.com/Microsoft/wsl/issues
2323

2424
## Submit a feature request
2525

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).
2827

2928
## Contribute to the docs
3029

@@ -36,42 +35,46 @@ Lastly, if your issue is related to the Windows Terminal, Windows Console, or th
3635

3736
## Common issues
3837

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
4039

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).
4241

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).
4443

4544
### Error: 0x1bc when `wsl --set-default-version 2`
45+
4646
This may happen when 'Display Language' or 'System Locale' setting is not English.
47-
```
47+
48+
```powershell
4849
wsl --set-default-version 2
4950
Error: 0x1bc
5051
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
5152
```
5253

5354
THe actual error for `0x1bc` is:
54-
```
55+
56+
```powershell
5557
WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel
5658
```
5759

5860
For more information, please refer to issue [5749](https://github.com/microsoft/WSL/issues/5749)
5961

60-
6162
### Cannot access WSL files from Windows
63+
6264
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.
6365

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:
6567

66-
```
68+
```bash
6769
[ 0.363323] 9p: Installing v9fs 9p2000 file system support
6870
[ 0.363336] FS-Cache: Netfs '9p' registered for caching
6971
[ 0.398989] 9pnet: Installing 9P2000 support
7072
```
7173

7274
Please see [this Github thread](https://github.com/microsoft/wsl/issues/5307) for further discussion on this issue.
7375

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+
7578
If your display language is not English, then it is possible you are seeing a truncated version of an error text.
7679

7780
```powershell
@@ -81,19 +84,51 @@ WSL 2
8184

8285
To resolve this issue, please visit `https://aka.ms/wsl2kernel` and install the kernel manually by following the directions on that doc page.
8386

87+
Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
88+
89+
### `command not found` when executing windows .exe in linux
90+
91+
Users can run Windows executables like notepad.exe directly from Linux. Sometimes, you may hit "command not found" like below:
92+
93+
```Bash
94+
$ notepad.exe
95+
-bash: notepad.exe: command not found
96+
```
97+
98+
If there are no win32 paths in your $PATH, interop isn't going to find the .exe.
99+
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.
100+
If you can't see any Windows paths then most likely your PATH is being overwritten by your Linux shell.
101+
102+
Here is a an example that /etc/profile on Debian contributed to the problem:
103+
104+
```Bash
105+
if [ "`id -u`" -eq 0 ]; then
106+
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
107+
else
108+
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
109+
fi
110+
```
111+
112+
The correct way on Debian is to remove above lines.
113+
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..
114+
115+
For more information, see issue [5296](https://github.com/microsoft/WSL/issues/5296) and issue [5779](https://github.com/microsoft/WSL/issues/5779).
116+
84117
### "Error: 0x80370102 The virtual machine could not be started because a required feature is not installed."
85118

86119
Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
87120

88121
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.)
89-
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:
90122

91-
```powershell
92-
Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true
93-
```
123+
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:
124+
125+
```powershell
126+
Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true
127+
```
128+
129+
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.
94130
95-
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.
96-
4. Restart your machine after enabling the `Virtual Machine Platform` optional component.
131+
4. Restart your machine after enabling the `Virtual Machine Platform` optional component.
97132
98133
### Bash loses network connectivity once connected to a VPN
99134
@@ -311,7 +346,7 @@ This error is related to being in a bad install state. Please complete the follo
311346

312347
If you're seeing this error:
313348

314-
```
349+
```bash
315350
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
316351
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
317352
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@ -320,7 +355,7 @@ Permissions 0777 for '/home/artur/.ssh/private-key.pem' are too open.
320355

321356
To fix this, append the following to the the ```/etc/wsl.conf``` file:
322357

323-
```
358+
```bash
324359
[automount]
325360
enabled = true
326361
options = metadata,uid=1000,gid=1000,umask=0022

WSL/tutorials/wsl-containers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ To learn more, checkout the [Introduction to Docker containers](/learn/modules/i
2727

2828
- Ensure your machine is running Windows 10, [updated to version 2004](ms-settings:windowsupdate), **Build 18362** or higher.
2929
- [Enable WSL, install a Linux distribution, and update to WSL 2](../install-win10.md).
30-
- [Download and install the Linux kernel update package](/windows/wsl/wsl2-kernel).
30+
- [Download and install the Linux kernel update package](../install-win10.md#step-4---download-the-linux-kernel-update-package).
3131
- [Install Visual Studio Code](https://code.visualstudio.com/download) *(optional)*. This will provide the best experience, including the ability to code and debug inside a remote Docker container and connected to your Linux distribution.
3232
- [Install Windows Terminal](/windows/terminal/get-started) *(optional)*. This will provide the best experience, including the ability to customize and open multiple terminals in the same interface (including Ubuntu, Debian, PowerShell, Azure CLI, or whatever you prefer to use).
3333
- [Sign up for a Docker ID at Docker Hub](https://hub.docker.com/signup) *(optional)*.
@@ -157,4 +157,4 @@ For more help with general troubleshooting issues in WSL, see the [Troubleshooti
157157
- [VS Code Blog: Guidelines for choosing a development environment](https://code.visualstudio.com/docs/containers/choosing-dev-environment#_guidelines-for-choosing-a-development-environment)
158158
- [VS Code Blog: Using Docker in WSL 2](https://code.visualstudio.com/blogs/2020/03/02/docker-in-wsl2)
159159
- [VS Code Blog: Using Remote Containers in WSL 2](https://code.visualstudio.com/blogs/2020/07/01/containers-wsl)
160-
- [Hanselminutes Podcast: Making Docker lovely for Developers with Simon Ferquel](https://hanselminutes.com/736/making-docker-lovely-for-developers-with-simon-ferquel)
160+
- [Hanselminutes Podcast: Making Docker lovely for Developers with Simon Ferquel](https://hanselminutes.com/736/making-docker-lovely-for-developers-with-simon-ferquel)

WSL/wsl2-mount-disk.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
title: Get started mounting a linux disk in WSL 2 (preview)
2+
title: Get started mounting a Linux disk in WSL 2 (preview)
33
description: Learn how to set up a disk mount in WSL 2 and how to access it.
44
keywords: wsl, windows, windowssubsystem, gnu, linux, bash, disk, ext4, filesystem, mount
55
ms.date: 06/08/2020
66
ms.topic: article
77
ms.localizationpriority: medium
88
---
99

10-
# Get started mounting a linux disk in WSL 2 (preview)
10+
# Get started mounting a Linux disk in WSL 2 (preview)
1111

1212
If you want to access a Linux disk format that isn't supported by Windows, you can use WSL 2 to mount your disk and access its content.
1313

@@ -170,4 +170,4 @@ If `Diskpath` is omitted, all attached disks are unmounted and detached.
170170

171171
- USB flash drives are not supported at this time and will fail to attach to WSL 2. USB disks are supported though.
172172

173-
- Only filesystems that are natively supported in the kernel can be mounted by `wsl --mount`. This means that it's not possible to use installed filesystem drivers (such as ntfs-3g for example) by calling `wsl --mount`.
173+
- Only filesystems that are natively supported in the kernel can be mounted by `wsl --mount`. This means that it's not possible to use installed filesystem drivers (such as ntfs-3g for example) by calling `wsl --mount`.

0 commit comments

Comments
 (0)