Skip to content

Commit

Permalink
Main > Live (MicrosoftDocs#1929)
Browse files Browse the repository at this point in the history
* Fixing small formatting and writing errors. (MicrosoftDocs#1863)

* Fix broken code block and bookmark link (MicrosoftDocs#1866)

* Fix broken code block

* Update broken wslconfig bookmark

* Update install-on-server.md (MicrosoftDocs#1871)

Fix indent and numbering for better readability.

* Fix punctuation errors (MicrosoftDocs#1876)

* small improvements in troubleshooting.md (MicrosoftDocs#1877)

Some small formatting improvements.
Also added the command to restart the hns service.

* Fix a few typos (MicrosoftDocs#1879)

Co-authored-by: Matt Wojciakowski <mattwoj@microsoft.com>

* Updated guide to fix an issue because of a wrong command (MicrosoftDocs#1884)

* Update wsl-containers.md

Running Dev Containers: **Open Folder in Container...** when using this guide is not / no longer correct, as most readers will already have opened the folder while connected to WSL based on the steps provided above. We need to use **Dev Containers: Reopen in Container** or it will fail to create the .devcontainer folder and devcontainer.json and give a (unfortunately not very clear) error message.


See also: https://code.visualstudio.com/docs/devcontainers/containers#_open-a-wsl-2-folder-in-a-container-on-windows
   
- Use the Dev Containers: Reopen in Container command from a folder already opened using the WSL extension.
- Select Dev Containers: Open Folder in Container... from the Command Palette (F1) and choose a WSL folder using the local \\wsl$ share (from the Windows side).

* Update wsl-containers.md

---------

Co-authored-by: Matt Wojciakowski <mattwoj@microsoft.com>

* Update faq.yml -- tiny grammar change (MicrosoftDocs#1885)

* Update faq.yml -- tiny grammar change 

'changes to locale to' -> 'changes the locale to'

* Update basic-commands.md

'If you running WSL' -> 'If you run WSL'

* Update basic-commands.md

* rephrase a long sentence
* swap order of two sentences to make example of command closer to the description of the command

example of command: `wsl --set-default-version 2`

* Update basic-commands.md

Replace 

wsl -u <Username>`, `wsl --user <Username>

with

wsl --user <Username>

`wsl -u <Username>` and `wsl --user <Username>` are equivalent. Both commands are correct for the section of the documentation, but the display of the commands in the documentation was incorrect due to the stray ticks and comma.

* Update gui-apps.md to simplify commits. (MicrosoftDocs#1880)

* Update gui-apps.md

If we are already referencing apt, why not just use apt to install google chrome?

* Update gui-apps.md

forgot --fix-missing

* Add a note to explain the command flags and path

---------

Co-authored-by: Matt Wojciakowski <mattwoj@microsoft.com>

* Fix anchor warning

* Updated docs for usbipd-win updates (MicrosoftDocs#1870)

* Updated docs for usbipd-win updates

* Update url to latest

Co-authored-by: Frans van Dorsselaer <17404029+dorssel@users.noreply.github.com>

* Fixes based on feedback

Thank you @dorssel !

* Remove admin requirement

Co-authored-by: Frans van Dorsselaer <17404029+dorssel@users.noreply.github.com>

* Remove x86 support

Co-authored-by: Frans van Dorsselaer <17404029+dorssel@users.noreply.github.com>

---------

Co-authored-by: Matt Wojciakowski <mattwoj@microsoft.com>
Co-authored-by: Frans van Dorsselaer <17404029+dorssel@users.noreply.github.com>

* Moving experimental settings to the experimental section (MicrosoftDocs#1901)

* Moving experimental settings to the experimental section

Some networking config settings are still experimental. Moving those to the experimental section of the document so customers know how to use these settings.

* Added code ticks to new setting entries

* Update wsl-config.md

fixing settings which are no longer experimental, but the text still referred to them as experimental

* Update wsl-config.md

fixed the string referring to autoProxy. it's no longer experimental.

---------

Co-authored-by: Matt Wojciakowski <mattwoj@microsoft.com>

* Moving ms.prod and ms.technology to ms.service and ms.subservice

* Update to new feedback mechanism (MicrosoftDocs#1917)

* Update to new feedback mechanism

* fix desc syntax

* Fix template link

* add svg support

* Update wsl-config.md to document the dnsProxy option (MicrosoftDocs#1920)

dnsProxy is a wls2 configuration option which we need to document for customers that need to turn off the NAT DNS proxy.

* User/chdhan/networking doc update 2/21/24 (MicrosoftDocs#1928)

* Signed-off-by: Chanpreet Dhanjal <chdhan@microsoft.com>

* updating troubleshooting page.

* Updating troubleshooting guide

* updating troubleshooting guide

* Editorial update, added explainer

* Update image alt text for accessibility

---------

Co-authored-by: Matt Wojciakowski <mattwoj@microsoft.com>

* Fix typo (MicrosoftDocs#1924)

Github -> GitHub

* Fix typo (MicrosoftDocs#1923)

Github -> GitHub

* Removed mention of deprecated content (MicrosoftDocs#1915)

* FAQ: Split Hyper-V and Windows Home questions into two (MicrosoftDocs#1914)

* FAQ: Split Hyper-V and Windows Home questions into two

Fixes MicrosoftDocs#899

* FAQ: clarify WSL features need to be enabled

* Update wsl-plugins.md (MicrosoftDocs#1913)

* Import export command clarification (MicrosoftDocs#1910)

* Split the import and export commands into separate sections

- My original intent was to clarify that the export command exports a **snapshot** of the specified distribution. The way it is currently written doesn't say otherwise, but it could be interpreted to mean it exports a clean install without the user's modifications. 

    - In other words, it could be saying `wsl --export Ubuntu ubuntu.tar` is equivalent to downloading the official "ubuntu.tar" from the internet. 
- Splitting these two was not part of my original goal, merely a step along the way to achieve it.
- I decided to make this its own commit so that it can be `cherry-pick`ed if it provides value on its own but the upcoming commits do not.

* Specify that the export command exports a snapshot

* Fix orphan links to import/export command sections

* fix ambiguous wording for required win version (MicrosoftDocs#1895)

Previously the docs stated that Windows version 22H2 was required, but that is wrong: microsoft/WSL#10853

it is specifically Windows *11* version 22H2 that is required.

---------

Co-authored-by: Stefan Nikolaj <51296436+snikolaj@users.noreply.github.com>
Co-authored-by: Anton Kesy <antonkesy@gmail.com>
Co-authored-by: Ishan Jain <github@ishan.jain.se>
Co-authored-by: Krishna Vivek Vitta <84629581+krishnacx@users.noreply.github.com>
Co-authored-by: icyerasor <andreas@feldschmid.com>
Co-authored-by: Blake-Madden <66873089+Blake-Madden@users.noreply.github.com>
Co-authored-by: vmsteiner <107506233+vmsteiner@users.noreply.github.com>
Co-authored-by: Andrew Zipperer <47086307+zipperer@users.noreply.github.com>
Co-authored-by: Wes Bryie <wes@wesbryie.tech>
Co-authored-by: Craig Loewen <crloewen@microsoft.com>
Co-authored-by: Frans van Dorsselaer <17404029+dorssel@users.noreply.github.com>
Co-authored-by: Keith Horton <khorton@microsoft.com>
Co-authored-by: Drew Batchelor (he/him) <drewbat@microsoft.com>
Co-authored-by: chanpreetdhanjal <68442928+chanpreetdhanjal@users.noreply.github.com>
Co-authored-by: Takashi Takebayashi <changeworld@users.noreply.github.com>
Co-authored-by: Patrick Brosset <patrickbrosset@gmail.com>
Co-authored-by: Daniel Kaplan <tieTYT@gmail.com>
Co-authored-by: Saisang Cai <Saisang@users.noreply.github.com>
Co-authored-by: jantari <jantari@outlook.de>
  • Loading branch information
1 parent a7f1dfa commit 9a131dd
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 18 deletions.
14 changes: 10 additions & 4 deletions WSL/basic-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,20 +171,26 @@ To terminate the specified distribution, or stop it from running, replace `<Dist
- `wsl hostname -i` for the IP address of your Linux distribution installed via WSL 2 (the WSL 2 VM address)
- `cat /etc/resolv.conf` for the IP address of the Windows machine as seen from WSL 2 (the WSL 2 VM)

## Import and export a distribution
## Export a distribution

```powershell
wsl --export <Distribution Name> <FileName>
```

Exports a snapshot of the specified distribution as a new distribution file. Defaults to tar format. The filename can be `-` for standard input. Options include:

- `--vhd`: Specifies the export distribution should be a .vhdx file instead of a tar file (this is only supported using WSL 2)

## Import a distribution

```powershell
wsl --import <Distribution Name> <InstallLocation> <FileName>
```

Imports and exports the specified tar file as a new distribution. The filename can be - for standard input. Options include:
Imports the specified tar file as a new distribution. The filename can be `-` for standard input. Options include:

- `--vhd`: Specifies the import/export distribution should be a .vhdx file instead of a tar file (this is only supported using WSL 2)
- `--version`: For import only, specifies whether to import the distribution as a WSL 1 or WSL 2 distribution
- `--vhd`: Specifies the import distribution should be a .vhdx file instead of a tar file (this is only supported using WSL 2)
- `--version <1/2>`: Specifies whether to import the distribution as a WSL 1 or WSL 2 distribution

## Import a distribution in place

Expand Down
17 changes: 12 additions & 5 deletions WSL/faq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ sections:
- question: |
How can I back up my WSL distributions?
answer: |
The best way to backup or move your distributions is via the [export/import commands](./basic-commands.md#import-and-export-a-distribution) available in Windows Version 1809 and later. You can export your entire distribution to a tarball using the `wsl --export` command. You can then import this distribution back into WSL using the `wsl --import` command, which can name a new drive location for the import, allowing you to backup and save states of (or move) your WSL distributions. To learn more about moving your WSL distributions, see [How can I transfer my WSL files from one machine to another?](#how-can-i-transfer-my-wsl-files-from-one-machine-to-another-).
The best way to backup or move your distributions is via the [export](./basic-commands.md#export-a-distribution)/[import](./basic-commands.md#import-a-distribution) commands available in Windows Version 1809 and later. You can export your entire distribution to a tarball using the `wsl --export` command. You can then import this distribution back into WSL using the `wsl --import` command, which can name a new drive location for the import, allowing you to backup and save states of (or move) your WSL distributions. To learn more about moving your WSL distributions, see [How can I transfer my WSL files from one machine to another?](#how-can-i-transfer-my-wsl-files-from-one-machine-to-another-).
Traditional backup services that backup files in your AppData folders (like Windows Backup) will not corrupt your Linux files.
Expand All @@ -186,7 +186,7 @@ sections:
answer: |
There are a few ways you can accomplish this task:
* The easiest way is to use the `wsl --export --vhd` command to export your WSL distribution to a VHD file. You can then copy this file to another machine, and import it using `wsl --import --vhd`. See the [Import and Export distributions in the WSL basic commands](./basic-commands.md#import-and-export-a-distribution) doc for more information.
* The easiest way is to use the `wsl --export --vhd` command to export your WSL distribution to a VHD file. You can then copy this file to another machine, and import it using `wsl --import --vhd`. See the [import](./basic-commands.md#import-a-distribution) and [export](./basic-commands.md#export-a-distribution) commands in [the WSL basic commands](./basic-commands.md) doc for more information.
* The implementation above requires a lot of disk space. If you don't have a lot of disk space you can use Linux techniques to move your files over:
* Use `tar -czf <tarballName> <directory>` to create a tarball of your files. You can then copy these specific files over to your new machine and run `tar -xzf <tarballName>` to extract them.
* You can also export a list of installed packages via `apt` with a command like so: `dpkg --get-selections | grep -v deinstall | awk '{print $1}' > package_list.txt` and then reinstall those same packages on another machine with a command like `sudo apt install -y $(cat package_list.txt)` after transferring the file over.
Expand Down Expand Up @@ -215,12 +215,19 @@ sections:
- name: WSL 2
questions:
- question: |
Does WSL 2 use Hyper-V? Will it be available on Windows 10 Home and Windows 11 Home?
Is WSL 2 available on Windows 10 Home and Windows 11 Home?
answer: |
WSL 2 is available on all Desktop SKUs where WSL is available, including Windows 10 Home and Windows 11 Home.
Yes. WSL 2 is available on all Desktop SKUs where WSL is available, including Windows 10 Home and Windows 11 Home.
The newest version of WSL uses Hyper-V architecture to enable its virtualization. This architecture will be available in the 'Virtual Machine Platform' optional component. This optional component will be available on all SKUs. You can expect to see more details about this experience soon as we get closer to the WSL 2 release.
Specifically, WSL2 requires two features to be enabled:
1. "Virtual Machine Platform" (a subset of Hyper-V)
2. "Windows Subsystem for Linux"
- question: |
Does WSL 2 use Hyper-V?
answer: |
The newest version of WSL uses a *subset* of Hyper-V architecture to enable its virtualization. This subset is provided as an optional component named "Virtual Machine Platform," available on all Desktop SKUs.
- question: |
What will happen to WSL 1? Will it be abandoned?
answer: |
Expand Down
2 changes: 1 addition & 1 deletion WSL/kernel-release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ We've added support for WSL 2 distributions, [which use a full Linux kernel](htt

*Release Date*: Prerelease 2022/08/02

[Official Github release link](https://github.com/microsoft/WSL2-Linux-Kernel/releases/tag/linux-msft-wsl-5.15.57.1)
[Official GitHub release link](https://github.com/microsoft/WSL2-Linux-Kernel/releases/tag/linux-msft-wsl-5.15.57.1)

- Initial release of the WSL2 kernel based on the v5.15 kernel series
- Release rolling-lts/wsl/5.15.57.1
Expand Down
Binary file added WSL/media/ghost_adapter_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added WSL/media/ghost_adapter_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added WSL/media/ghost_adapter_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion WSL/store-release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ms.topic: article

# Release Notes for Windows Subsystem for Linux in the Microsoft Store

The release notes for [WSL inside of the Microsoft Store](https://aka.ms/wslstorepage) can be found on the [Microsoft/WSL Github repository releases page](https://github.com/microsoft/WSL/releases). Please see that list for latest updates.
The release notes for [WSL inside of the Microsoft Store](https://aka.ms/wslstorepage) can be found on the [Microsoft/WSL GitHub repository releases page](https://github.com/microsoft/WSL/releases). Please see that list for latest updates.

## Known Issues:
* Launching Windows Subsystem for Linux from session zero does not currently work (for example from an ssh connection).
19 changes: 18 additions & 1 deletion WSL/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Troubleshooting Windows Subsystem for Linux
description: Provides detailed information about common errors and issues people run into while running Linux on the Windows Subsystem for Linux.
ms.date: 11/15/2023
ms.date: 02/22/2024
ms.topic: article
---

Expand Down Expand Up @@ -436,6 +436,23 @@ This is a flaw within HNS which has been fixed with the latest Windows 11 releas
```Restart-Service hns```
- When WSL is restarted, HNS will create new Firewall rules, correctly targeting the WSL interface.

### Manual way to delete phantom adapters

*Ghost adapters*, or phantom Plug and Play (PnP) devices, refer to hardware components that appear in your system but are not physically connected. These “ghost” devices can cause confusion and clutter in your system settings. If you see ghost adapters when running WSL in a Virtual Machine (VM), follow these manual steps to find and delete these Phantom PnP devices. Microsoft is working on an automated solution that will not require manual intervention. More information will be coming soon.

1. Open Device Manager
2. View > Show hidden devices

![Screenshot of Device Manager show hidden devices menu](media/ghost_adapter_1.png)

3. Open Network adapters

![Screenshot of Network adapters list](media/ghost_adapter_2.png)

4. Right-click over the Ghosted network adapter and select **Uninstall Device**

![Screenshot of right-clicking a phantom pnp from the network list and selecting uninstall device](media/ghost_adapter_3.png)

### Starting WSL or installing a distribution returns an error code

Follow the instructions to [Collect WSL logs](https://github.com/Microsoft/WSL/blob/master/CONTRIBUTING.md#8-detailed-logs) in the WSL repo on GitHub to collect detailed logs and file an issue on our GitHub.
Expand Down
1 change: 0 additions & 1 deletion WSL/tutorials/wsl-vscode.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,3 @@ A few additional extensions you may want to consider include:

* [Keymaps from other editors](https://marketplace.visualstudio.com/search?target=VSCode&category=Keymaps&sortBy=Downloads): These extensions can help your environment feel right at home if you're transitioning from another text editor (like Atom, Sublime, Vim, eMacs, Notepad++, etc).
* [Settings Sync](https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync): Enables you to synchronize your VS Code settings across different installations using GitHub. If you work on different machines, this helps keep your environment consistent across them.
* [Debugger for Chrome](https://code.visualstudio.com/blogs/2016/02/23/introducing-chrome-debugger-for-vs-code): Once you finish developing on the server side with Linux, you'll need to develop and test the client side. This extension integrates your VS Code editor with your Chrome browser debugging service, making things a bit more efficient.
3 changes: 2 additions & 1 deletion WSL/wsl-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ This file can contain the following options that affect the VM that powers any W
| debugConsole | boolean* | `false` | Boolean to turn on an output console Window that shows the contents of `dmesg` upon start of a WSL 2 distro instance. Only available for Windows 11.|
| nestedVirtualization | boolean* | `true` | Boolean to turn on or off nested virtualization, enabling other nested VMs to run inside WSL 2. Only available for Windows 11.|
| vmIdleTimeout | number* | `60000` | The number of milliseconds that a VM is idle, before it is shut down. Only available for Windows 11.|
| dnsProxy | bool | true | Only applicable to networkingMode = NAT. Boolean to inform WSL to configure the DNS Server in Linux to the NAT on the host. Setting to false will mirror DNS servers from Windows to Linux. |
| networkingMode** | string | NAT | If the value is `mirrored` then this turns on mirrored networking mode. Default or unrecognized strings result in NAT networking. |
| firewall** | bool | true | Setting this to true allows the Windows Firewall rules, as well as rules specific to Hyper-V traffic, to filter WSL network traffic. |
| dnsTunneling** | bool | false | Changes how DNS requests are proxied from WSL to Windows |
Expand All @@ -232,7 +233,7 @@ Entries with the `size` value must be a size followed by a unit, for example, `8

Entries with an * after the value type are only available on Windows 11.

Entries with an ** after the value type require [Windows version 22H2](https://blogs.windows.com/windows-insider/2023/09/14/releasing-windows-11-build-22621-2359-to-the-release-preview-channel/) or higher.
Entries with an ** after the value type require [Windows 11 version 22H2](https://blogs.windows.com/windows-insider/2023/09/14/releasing-windows-11-build-22621-2359-to-the-release-preview-channel/) or higher.

### Experimental settings

Expand Down
8 changes: 4 additions & 4 deletions WSL/wsl-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ You can then press the “Build” tab and build your project, which will output

### Testing your Plugin

WSL plugins will only run if they are [digitally signed]( https://learn.microsoft.com/windows-hardware/drivers/install/digital-signatures). To test this you will need to enable test signing on your machine.
WSL plugins will only run if they are [digitally signed](/windows-hardware/drivers/install/digital-signatures). To test this you will need to enable test signing on your machine.

#### Enabling test signing and creating a test certification

Open an elevated PowerShell Window and [enable test signing]( https://learn.microsoft.com/windows-hardware/drivers/install/the-testsigning-boot-configuration-option#enable-or-disable-use-of-test-signed-code) by running this command:
Open an elevated PowerShell Window and [enable test signing](/windows-hardware/drivers/install/the-testsigning-boot-configuration-option#enable-or-disable-use-of-test-signed-code) by running this command:
```powershell
## If this command results in "The value is protected by Secure Boot policy and cannot be modified or deleted"
## Then reboot the PC, go into BIOS settings, and disable Secure Boot. BitLocker may also affect your ability to modify this setting.
Expand All @@ -65,7 +65,7 @@ Last import the certificate to the Trusted Root Certification Authority:
certutil -addstore "Root" ".\$certname.cer"
```

See the [how to create a self signed certificate]( https://learn.microsoft.com/entra/identity-platform/howto-create-self-signed-certificate) docs page for more info.
See the [how to create a self signed certificate](/entra/identity-platform/howto-create-self-signed-certificate) docs page for more info.

#### Install the plugin

Expand Down Expand Up @@ -97,7 +97,7 @@ Common error codes:

- Wsl/Service/CreateInstance/CreateVm/Plugin/ERROR_MOD_NOT_FOUND -> The plugin DLL could not be loaded. Check that the plugin registration path is correct
- Wsl/Service/CreateInstance/CreateVm/Plugin/TRUST_E_NOSIGNATURE -> The plugin DLL is not signed, or its signature is not trusted by the computer
- Please [enable test signing]( https://learn.microsoft.com/windows-hardware/drivers/install/the-testsigning-boot-configuration-option#enable-or-disable-use-of-test-signed-code) and see [the signing section above on how to set up a test certificate](#enabling-test-signing-and-creating-a-test-certification).
- Please [enable test signing](/windows-hardware/drivers/install/the-testsigning-boot-configuration-option#enable-or-disable-use-of-test-signed-code) and see [the signing section above on how to set up a test certificate](#enabling-test-signing-and-creating-a-test-certification).
- Wsl/Service/CreateInstance/CreateVm/Plugin/* -> The plugin DLL returned an error in WSLPLUGINAPI_ENTRYPOINTV1 or OnVmStarted()
- Wsl/Service/CreateInstance/Plugin/* -> The plugin DLL returned an error in OnDistributionStarted()

Expand Down

0 comments on commit 9a131dd

Please sign in to comment.