Skip to content

Commit a133bc6

Browse files
Fixed merge conflicts for troubleshooting
2 parents 59c945c + 1d89082 commit a133bc6

2 files changed

Lines changed: 24 additions & 5 deletions

File tree

WSL/compare-versions.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
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 Hard Disk (VHD).
4-
keywords: BashOnWindows, bash, wsl, windows, windowssubsystem, gnu, linux, ubuntu, debian, suse, windows 10, UX changes, WSL 2, linux kernel, network applications, localhost, IPv6, Virtual Hard Disk, VHD, VHD limitations, VHD error
5-
ms.date: 09/15/2020
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).
4+
keywords: BashOnWindows, bash, wsl, windows, windowssubsystem, gnu, linux, ubuntu, debian, suse, windows 10, UX changes, WSL 2, linux kernel, network applications, localhost, IPv6, Virtual Hardware Disk, VHD, VHD limitations, VHD error
5+
ms.date: 09/28/2020
66
ms.topic: conceptual
77
ms.localizationpriority: high
88
ms.custom: contperfq1
@@ -44,7 +44,12 @@ For example, when storing your WSL project files:
4444
- Use the Linux file system root directory: `\\wsl$\Ubuntu-18.04\home\<user name>\Project`
4545
- Not the Windows file system root directory: `C:\Users\<user name>\Project`
4646

47-
You can access your Linux root file system with Windows apps and tools like File Explorer. Try opening a Linux distribution (like Ubuntu), be sure that you are in the Linux home directory by entering this command: `cd ~`. Then open your Linux file system in File Explorer by entering *(don't forget the period at the end)*: `explorer.exe .`
47+
All currently running distributions (`wsl -l`) are accessible via network connection. To get there run a command \[WIN+R\] (keyboard shortcut) or type in File Explorer address bar `\\wsl$` to find respective distribution names and access their root file systems.
48+
49+
You can also use windows commands inside WSL's Linux [Terminal](https://en.wikipedia.org/wiki/Linux_console). Try opening a Linux distribution (ie Ubuntu), be sure that you are in the Linux home directory by entering this command: `cd ~`. Then open your Linux file system in File Explorer by entering *(don't forget the period at the end)*: `powershell.exe /c start .`
50+
51+
> [!IMPORTANT]
52+
> If you experience an error **-bash: powershell.exe: command not found** please refer to the [WSL troubleshooting page](troubleshooting.md#running-windows-commands-fails-inside-a-distribution) to resolve it.
4853
4954
WSL 2 is only available in Windows 10, Version 1903, Build 18362 or higher. Check your Windows version by selecting the **Windows logo key + R**, type **winver**, select **OK**. (Or enter the `ver` command in Windows Command Prompt). You may need to [update to the latest Windows version](ms-settings:windowsupdate). For builds lower than 18362, WSL is not supported at all.
5055

WSL/troubleshooting.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Troubleshooting the Windows Subsystem for Linux
33
description: Provides detailed information about common errors and issues people run into while running Linux on the Windows Subsystem for Linux.
44
keywords: BashOnWindows, bash, wsl, windows, windowssubsystem, ubuntu
5-
ms.date: 01/20/2020
5+
ms.date: 09/28/2020
66
ms.topic: article
77
ms.localizationpriority: high
88
---
@@ -84,8 +84,11 @@ WSL 2
8484

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

87+
<<<<<<< HEAD
8788
Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
8889

90+
=======
91+
>>>>>>> master
8992
### `command not found` when executing windows .exe in linux
9093

9194
Users can run Windows executables like notepad.exe directly from Linux. Sometimes, you may hit "command not found" like below:
@@ -362,3 +365,14 @@ options = metadata,uid=1000,gid=1000,umask=0022
362365
```
363366

364367
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.
368+
369+
### Running Windows commands fails inside a distribution
370+
371+
Some distributions [available in Microsoft Store](install-win10.md#step-6---install-your-linux-distribution-of-choice) are yet not fully compatible to run Windows commands in [Terminal](https://en.wikipedia.org/wiki/Linux_console) out of the box. If you get an error `-bash: powershell.exe: command not found` running `powershell.exe /c start .` or any other Windows command, you can resolve it following these steps:
372+
373+
1. In your WSL distribution run `echo $PATH`.
374+
If it does not include: `/mnt/c/Windows/system32` something is redefining the standard PATH variable.
375+
2. Check profile settings with `cat /etc/profile`.
376+
If it contains assignment of the PATH variable, edit the file to comment out PATH assignment block with a **#** character.
377+
3. Check if wsl.conf is present `cat /etc/wsl.conf` and make sure it does not contain `appendWindowsPath=false`, otherwise comment it out.
378+
4. Restart distribution by typing `wsl -t ` followed by distribution name or run `wsl --shutdown` either in cmd or PowerShell.

0 commit comments

Comments
 (0)