Skip to content

Commit a7f1dfa

Browse files
mattwojosnikolajantonkesyb1thunt3rkrishnacx
authored
Merge main > live (MicrosoftDocs#1919)
* 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * Fixes based on feedback Thank you @dorssel ! * Remove admin requirement Co-authored-by: Frans van Dorsselaer <[email protected]> * Remove x86 support Co-authored-by: Frans van Dorsselaer <[email protected]> --------- Co-authored-by: Matt Wojciakowski <[email protected]> Co-authored-by: Frans van Dorsselaer <[email protected]> * 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 <[email protected]> * 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 --------- Co-authored-by: Stefan Nikolaj <[email protected]> Co-authored-by: Anton Kesy <[email protected]> Co-authored-by: Ishan Jain <[email protected]> Co-authored-by: Krishna Vivek Vitta <[email protected]> Co-authored-by: icyerasor <[email protected]> Co-authored-by: Blake-Madden <[email protected]> Co-authored-by: vmsteiner <[email protected]> Co-authored-by: Andrew Zipperer <[email protected]> Co-authored-by: Wes Bryie <[email protected]> Co-authored-by: Craig Loewen <[email protected]> Co-authored-by: Frans van Dorsselaer <[email protected]> Co-authored-by: Keith Horton <[email protected]> Co-authored-by: Drew Batchelor (he/him) <[email protected]>
1 parent d90da18 commit a7f1dfa

File tree

5 files changed

+139
-36
lines changed

5 files changed

+139
-36
lines changed

.github/ISSUE_TEMPLATE/doc-issue.yml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Post a documentation issue
2+
title: Contribute Feedback
3+
description: >-
4+
Post an issue specific to WSL documentation.
5+
labels:
6+
- "needs-triage"
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: "## Enter your feedback"
11+
- type: markdown
12+
attributes:
13+
value: Select the issue type, and describe the issue in the text box below. Add as much detail as needed to help us resolve the issue.
14+
- type: dropdown
15+
id: issue-type
16+
attributes:
17+
label: Type of issue
18+
options:
19+
- Typo
20+
- Code doesn't work
21+
- Missing information
22+
- Outdated article
23+
- Other (describe below)
24+
validations:
25+
required: true
26+
- type: textarea
27+
id: userfeedback
28+
validations:
29+
required: true
30+
attributes:
31+
label: Feedback
32+
description: Provide details that will add context on what should be updated in the documentation. Additional details not needed for typos, grammar, formatting, etc. For technical or factual errors, please include code snippets and output to show how the documentation is incorrect.
33+
- type: markdown
34+
attributes:
35+
value: "## Article information"
36+
- type: markdown
37+
attributes:
38+
value: "*Don't modify the following fields*. They are automatically filled in for you. Doing so will disconnect your issue from the affected article. *Don't edit them*."
39+
- type: input
40+
id: pageUrl
41+
validations:
42+
required: true
43+
attributes:
44+
label: Page URL
45+
- type: input
46+
id: contentSourceUrl
47+
validations:
48+
required: true
49+
attributes:
50+
label: Content source URL
51+
- type: input
52+
id: author
53+
validations:
54+
required: true
55+
attributes:
56+
label: Author
57+
description: GitHub Id of the author
58+
- type: input
59+
id: documentVersionIndependentId
60+
validations:
61+
required: true
62+
attributes:
63+
label: Document Id

WSL/connect-usb.md

+17-21
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Connect USB devices
33
description: Learn how to connect a USB device to your WSL 2 Linux distribution using usbipd-win.
4-
ms.date: 11/20/2023
4+
ms.date: 01/04/2024
55
ms.topic: article
66
---
77

@@ -14,9 +14,9 @@ Setting up the USB/IP project on your Windows machine will enable common develop
1414
## Prerequisites
1515

1616
- Running Windows 11 (Build 22000 or later). *(Windows 10 support is possible, see note below).*
17-
- A machine with an x64/x86 processor is required. (Arm64 is currently not supported with usbipd-win).
17+
- A machine with an x64 processor is required. (x86 and Arm64 are currently not supported with usbipd-win).
18+
- WSL is [installed and set up with the latest version](./install.md).
1819
- Linux distribution installed and [set to WSL 2](./basic-commands.md#set-wsl-version-to-1-or-2).
19-
- Running [Linux kernel 5.10.60.1 or later](./kernel-release-notes.md).
2020

2121
> [!NOTE]
2222
> To check your Windows version and build number, select **Windows logo key + R**, type **winver**, select **OK**. You can update to the latest Windows version by selecting **Start** > **Settings** > **Windows Update** > **[Check for updates](ms-settings:windowsupdate)**.
@@ -42,33 +42,29 @@ This will install:
4242
- A command line tool `usbipd`. The location of this tool will be added to the PATH environment variable.
4343
- A firewall rule called `usbipd` to allow all local subnets to connect to the service. You can modify this firewall rule to fine tune access control.
4444

45-
## Install the USBIP tools and hardware database in Linux
46-
47-
Once the USB/IP project has completed installing, you will need to install the user space tools and a database of USB hardware identifiers. These instructions are for Ubuntu — [other distributions may require a different usbip client package](https://github.com/dorssel/usbipd-win/wiki/WSL-support#usbip-client-tools).
45+
## Attach a USB device
4846

49-
On Ubuntu, run this command:
47+
Before attaching your USB device, ensure that a WSL command line is open. This will keep the WSL 2 lightweight VM active.
5048

51-
```bash
52-
sudo apt install linux-tools-generic hwdata
53-
sudo update-alternatives --install /usr/local/bin/usbip usbip /usr/lib/linux-tools/*-generic/usbip 20
54-
```
49+
> [!NOTE]
50+
> This doc assumes that you have [`usbipd-win 4.0.0` or higher installed](https://github.com/dorssel/usbipd-win/releases/latest)
5551
56-
At this point a service is running on Windows to share USB devices, and the necessary tools are installed in WSL to attach to shared devices.
52+
1. List all of the USB devices connected to Windows by opening PowerShell in *administrator* mode and entering the following command. Once the devices are listed, select and copy the bus ID of the device you’d like to attach to WSL.
5753

58-
## Attach a USB device
59-
60-
Before attaching your USB device, ensure that a WSL command line is open. This will keep the WSL 2 lightweight VM active.
54+
```powershell
55+
usbipd list
56+
```
6157
62-
1. List all of the USB devices connected to Windows by opening PowerShell in *administrator* mode and entering the command:
58+
2. Before attaching the USB device, the command `usbipd bind` must be used to share the device, allowing it to be attached to WSL. This requires administrator privileges. Select the bus ID of the device you would like to use in WSL and run the following command. After running the command, verify that the device is shared using the command `usbipd list` again.
6359
6460
```powershell
65-
usbipd wsl list
61+
usbipd bind --busid 4-4
6662
```
6763
68-
2. Select the bus ID of the device you’d like to attach to WSL and run this command. You’ll be prompted by WSL for a password to run a sudo command. The Linux distribution to be attached must be your default distribution. (See the [Basic commands for WSL](./basic-commands.md#set-default-linux-distribution) doc to change your default distribution).
64+
3. To attach the USB device, run the following command. (You no longer need to use an elevated administrator prompt.) Ensure that a WSL command prompt is open in order to keep the WSL 2 lightweight VM active. Note that as long as the USB device is attached to WSL, it cannot be used by Windows. Once attached to WSL, the USB device can be used by any distribution running as WSL 2. Verify that the device is attached using `usbipd list`. From the WSL prompt, run `lsusb` to verify that the USB device is listed and can be interacted with using Linux tools.
6965
7066
```powershell
71-
usbipd wsl attach --busid <busid>
67+
usbipd attach --wsl --busid <busid>
7268
```
7369
7470
3. Open Ubuntu (or your preferred WSL command line) and list the attached USB devices using the command:
@@ -79,10 +75,10 @@ Before attaching your USB device, ensure that a WSL command line is open. This
7975
8076
You should see the device you just attached and be able to interact with it using normal Linux tools. Depending on your application, you may need to configure udev rules to allow non-root users to access the device.
8177
82-
4. Once you are done using the device in WSL, you can either physically disconnect the USB device or run this command from PowerShell in *administrator* mode:
78+
4. Once you are done using the device in WSL, you can either physically disconnect the USB device or run this command from PowerShell:
8379
8480
```powershell
85-
usbipd wsl detach --busid <busid>
81+
usbipd detach --busid <busid>
8682
```
8783
8884
To learn more about how this works, see the [Windows Command Line Blog](https://devblogs.microsoft.com/commandline/connecting-usb-devices-to-wsl/#how-it-works) and the [usbipd-win repo on GitHub](https://devblogs.microsoft.com/commandline/connecting-usb-devices-to-wsl/#how-it-works).

WSL/docfx.json

+13-5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"files": [
2222
"**/*.png",
2323
"**/*.gif",
24-
"**/*.jpg"
24+
"**/*.jpg",
25+
"**/*.svg"
2526
],
2627
"exclude": [
2728
"**/obj/**",
@@ -35,10 +36,17 @@
3536
"breadcrumb_path": "/windows/wsl/breadcrumb/toc.json",
3637
"uhfHeaderId": "MSDocsHeader-Windows",
3738
"recommendations" : true,
38-
"feedback_system": "GitHub",
39-
"feedback_github_repo": "MicrosoftDocs/WSL",
40-
"ms.prod": "dev-environment",
41-
"ms.technology": "windows-subsystem-for-linux",
39+
"feedback_product_url": "https://github.com/Microsoft/wsl/issues",
40+
"feedback_system": "OpenSource",
41+
"open_source_feedback_contributorGuideUrl": "https://learn.microsoft.com/contribute/content/how-to-write-quick-edits",
42+
"open_source_feedback_issueTitle": "",
43+
"open_source_feedback_issueLabels": "needs-triage",
44+
"open_source_feedback_issueUrl": "https://github.com/MicrosoftDocs/wsl/issues/new?template=doc-issue.yml",
45+
"open_source_feedback_productLogoLightUrl": "https://learn.microsoft.com/windows/wsl/media/wsl-icon.svg",
46+
"open_source_feedback_productLogoDarkUrl": "https://learn.microsoft.com/windows/wsl/media/wsl-icon.svg",
47+
"open_source_feedback_productName": "Windows Subsystem for Linux",
48+
"ms.service": "dev-environment",
49+
"ms.subservice": "windows-subsystem-for-linux",
4250
"author": "craigloewen-msft",
4351
"ms.author": "crloewen",
4452
"searchScope": ["WSL"],

WSL/media/wsl-icon.svg

+32
Loading

WSL/wsl-config.md

+14-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Advanced settings configuration in WSL
33
description: A guide to the wsl.conf and .wslconfig files used for configuring settings when running multiple Linux distributions on Windows Subsystem for Linux.
4-
ms.date: 11/10/2023
4+
ms.date: 01/17/2024
55
ms.topic: article
66
ms.custom: seo-windows-dev
77
adobe-target: true
@@ -221,15 +221,10 @@ This file can contain the following options that affect the VM that powers any W
221221
| 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.|
222222
| 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.|
223223
| vmIdleTimeout | number* | `60000` | The number of milliseconds that a VM is idle, before it is shut down. Only available for Windows 11.|
224-
|networkingMode**| string | NAT | If the value is `mirrored` then this turns on mirrored networking mode. Default or unrecognized strings result in NAT networking. |
225-
|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. |
226-
|dnsTunneling**| bool | false | Changes how DNS requests are proxied from WSL to Windows |
227-
|autoProxy*| bool | false | Enforces WSL to use Windows’ HTTP proxy information |
228-
|useWindowsDnsCache**| bool | false | Only applicable when `experimental.dnsTunneling` is set to true. When this option is set to false, DNS requests tunneled from Linux will bypass cached names within Windows to always put the requests on the wire. |
229-
|bestEffortDnsParsing**| bool | false | Only applicable when `experimental.dnsTunneling` is set to true. When set to true, Windows will extract the question from the DNS request and attempt to resolve it, ignoring the unknown records. |
230-
|initialAutoProxyTimeout*| string | 1000 | Only applicable when `experimental.autoProxy` is set to true. Configures how long (in milliseconds) WSL will wait for retrieving HTTP proxy information when starting a WSL container. If proxy settings are resolved after this time, the WSL instance must be restarted to use the retrieved proxy settings. |
231-
|ignoredPorts**| string | null | Only applicable when `experimental.networkingMode` is set to `mirrored`. Specifies which ports Linux applications can bind to, even if that port is used in Windows. This enables applications to listen on a port for traffic purely within Linux, so those applications are not blocked even when that port is used for other purposes on Windows. For example, WSL will allow binding to port 53 in Linux for Docker Desktop, as it is listening only to requests from within the Linux container. Should be formatted in a comma separated list, e.g: `3000,9000,9090` |
232-
|hostAddressLoopback**| bool | false | Only applicable when `experimental.networkingMode` is set to `mirrored`. When set to True, will allow the Container to connect to the Host, or the Host to connect to the Container, by an IP address that's assigned to the Host. Note that the 127.0.0.1 loopback address can always be used - this option allows for all additionally assigned local IP addresses to be used as well. |
224+
| networkingMode** | string | NAT | If the value is `mirrored` then this turns on mirrored networking mode. Default or unrecognized strings result in NAT networking. |
225+
| 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. |
226+
| dnsTunneling** | bool | false | Changes how DNS requests are proxied from WSL to Windows |
227+
| autoProxy* | bool | false | Enforces WSL to use Windows’ HTTP proxy information |
233228

234229
Entries with the `path` value must be Windows paths with escaped backslashes, e.g: `C:\\Temp\\myCustomKernel`
235230

@@ -249,6 +244,15 @@ These settings are opt-in previews of experimental features that we aim to make
249244
|:----|:----|:----|:----|
250245
|`autoMemoryReclaim`| string | disabled | Automatically releases cached memory after detecting idle CPU usage. Set to `gradual` for slow release, and `dropcache` for instant release of cached memory. |
251246
|`sparseVhd`| bool | false | When set to true, any newly created VHD will be set to sparse automatically. |
247+
|`useWindowsDnsCache`**| bool | false | Only applicable when `wsl2.dnsTunneling` is set to true. When this option is set to false, DNS requests tunneled from Linux will bypass cached names within Windows to always put the requests on the wire. |
248+
|`bestEffortDnsParsing`**| bool | false | Only applicable when `wsl2.dnsTunneling` is set to true. When set to true, Windows will extract the question from the DNS request and attempt to resolve it, ignoring the unknown records. |
249+
|`initialAutoProxyTimeout`*| string | 1000 | Only applicable when `wsl2.autoProxy` is set to true. Configures how long (in milliseconds) WSL will wait for retrieving HTTP proxy information when starting a WSL container. If proxy settings are resolved after this time, the WSL instance must be restarted to use the retrieved proxy settings. |
250+
|`ignoredPorts`**| string | null | Only applicable when `wsl2.networkingMode` is set to `mirrored`. Specifies which ports Linux applications can bind to, even if that port is used in Windows. This enables applications to listen on a port for traffic purely within Linux, so those applications are not blocked even when that port is used for other purposes on Windows. For example, WSL will allow binding to port 53 in Linux for Docker Desktop, as it is listening only to requests from within the Linux container. Should be formatted in a comma separated list, e.g: `3000,9000,9090` |
251+
|`hostAddressLoopback`**| bool | false | Only applicable when `wsl2.networkingMode` is set to `mirrored`. When set to True, will allow the Container to connect to the Host, or the Host to connect to the Container, by an IP address that's assigned to the Host. Note that the 127.0.0.1 loopback address can always be used - this option allows for all additionally assigned local IP addresses to be used as well. |
252+
253+
Entries with an * after the value type are only available on Windows 11.
254+
255+
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.
252256

253257
## Example .wslconfig file
254258

0 commit comments

Comments
 (0)