Fix grammar, typos, and formatting in docs and source (#14286)

* Fix localization text, Intune capitalization, ADMX indentation, unused import - distributions/validate.py: Remove unused 'import base64' - en-US/en-GB Resources.resw: Fix word order 'the list distribution' -> 'the distribution list' in MessageCouldFetchDistributionList - en-US/en-GB Resources.resw: Remove trailing space from MessageCorruptedDistroRegistration value - intune/en-US/WSL.adml: Fix 'For Linux' -> 'for Linux' capitalization (5 occurrences) to match official product name - intune/WSL.admx: Fix inconsistent 3-space indent to 4-space on AllowWSL1 and CustomKernelUserSettingConfigurable policies * Fix grammar, typos, and formatting in docs and source code - WmiService.h: Fix duplicated word 'of of' -> 'is of' in WQL comment - drvfs.md: Fix 'which tell' -> 'which tells' (subject-verb agreement), double space, second 'tell' -> 'tells' - systemd.md: Fix 'tries synchronizes' -> 'tries to synchronize' - wslhost.exe.md: Fix 'processes terminates' -> 'process terminates' - boot-process.md: Add missing 'in' preposition, fix C:/ -> C:\, fix lowercase 'linux' to 'Linux' (4 occurrences), fix misplaced parenthesis - init.md: Fix double space before hvsocket backtick - session-leader.md: Fix heading level ## -> ### to match sibling section - CONTRIBUTING.md: Fix double period after bold security notice - debugging.md: Fix missing word 'be' in 'can enabled', fix 'process' -> 'processes' - index.md: Add missing period at end of sentence - technical-documentation/index.md: Fix 'API's' -> 'APIs' (remove incorrect apostrophe) - relay.md: Fix lowercase 'linux' to 'Linux' (3 occurrences) - localhost.md: Fix lowercase 'linux' to 'Linux' - plan9.md: Fix lowercase 'linux' to 'Linux' * update errormessages testcase --------- Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

Ben Hillis committed Mar 3, 2026 at 18:13 UTC 8c220dc083bf635e5d4449750fee82bf69d61553
20 files changed +36 -37
CONTRIBUTING.md
+1 -1
@@ -32,7 +32,7 @@ Thank you in advance for your contribution! We appreciate your help in making WS
32 ## Notes for collecting WSL logs
33
34 ### Important: Reporting BSODs and Security issues
35 -**Do not open GitHub issues for Windows crashes (BSODs) or security issues.**. Instead, send Windows crashes or other security-related issues to secure@microsoft.com.
35 +**Do not open GitHub issues for Windows crashes (BSODs) or security issues.** Instead, send Windows crashes or other security-related issues to secure@microsoft.com.
36 See the `10) Reporting a Windows crash (BSOD)` section below for detailed instructions.
37
38 ### Reporting issues in Windows Console or WSL text rendering/user experience
distributions/validate.py
-1
@@ -2,7 +2,6 @@ import requests
2 import json
3 import sys
4 import hashlib
5 -import base64
5 import difflib
6 from urllib.request import urlretrieve
7 from xml.etree import ElementTree
doc/docs/debugging.md
+2 -2
@@ -41,7 +41,7 @@ Notable ETL providers:
41 - `Microsoft.Windows.Plan9.Server`: Logs from the Windows plan9 server (used when accessing /mnt/ shares and running Windows)
42
43
44 -On the Linux side, the easiest way to access logs is to look at `dmesg` or use the debug console, which can enabled by writing:
44 +On the Linux side, the easiest way to access logs is to look at `dmesg` or use the debug console, which can be enabled by writing:
45
46 ```
47 [wsl2]
@@ -65,7 +65,7 @@ Once started, just use `dir /path/to/wsl/source` in gdb to connect the source fi
65
66 ## Root namespace debugging
67
68 -Some WSL process such as `gns` or `mini_init` aren't accessible from within WSL distributions. To attach a debugger to those, use the debug shell via:
68 +Some WSL processes such as `gns` or `mini_init` aren't accessible from within WSL distributions. To attach a debugger to those, use the debug shell via:
69
70 ```
71 wsl --debug-shell
doc/docs/index.md
+1 -1
@@ -7,4 +7,4 @@ For user documentation, including installation and configuration, see [https://l
7
8 To get started developing (building, testing and deploying), see [Getting started](dev-loop.md).
9
10 -To learn more about how WSL works, see [technical documentation](technical-documentation/index.md)
10 +To learn more about how WSL works, see [technical documentation](technical-documentation/index.md).
doc/docs/technical-documentation/boot-process.md
+6 -6
@@ -64,7 +64,7 @@ See `src/windows/common/hcs_schema.h` for more details on the HCS JSON schema.
64
65 Part of the JSON configuration includes:
66
67 -- The kernel: WSL will use its built-in kernel, usually installed `C:/Program Files/WSL/tools/kernel`, or a custom kernel if overridden via [.wslconfig](https://learn.microsoft.com/windows/wsl/wsl-config)
67 +- The kernel: WSL will use its built-in kernel, usually installed in `C:\Program Files\WSL\tools\kernel`, or a custom kernel if overridden via [.wslconfig](https://learn.microsoft.com/windows/wsl/wsl-config)
68 - The initramfs: WSL uses its own initramfs (usually installed in `C:\Program Files\WSL\tools\initrd.img`). It's an image that only contains the [mini_init](mini_init.md) binary
69 - The resources accessible to the virtual machine such as CPU, RAM, GPU, etc
70
@@ -88,13 +88,13 @@ After applying all the configuration requested by [wslservice.exe](wslservice.ex
88
89 ## Starting a Linux distribution
90
91 -To start a new distribution, [wslservice.exe](wslservice.exe.md) sends a `LxMiniInitMessageLaunchInit` message to [mini_init](mini_init.md), which then mounts the distribution vhd and starts [init](init.md). See ([init](init.md) for more details on WSL2 distributions configuration)
91 +To start a new distribution, [wslservice.exe](wslservice.exe.md) sends a `LxMiniInitMessageLaunchInit` message to [mini_init](mini_init.md), which then mounts the distribution vhd and starts [init](init.md). See [init](init.md) for more details on WSL2 distributions configuration.
92
93 -Once running, [wslservice.exe](wslservice.exe.md) can then send a `LxInitMessageCreateSession` message to start a new [session leader](session-leader.md) inside that distribution, which can be used to launch linux processes
93 +Once running, [wslservice.exe](wslservice.exe.md) can then send a `LxInitMessageCreateSession` message to start a new [session leader](session-leader.md) inside that distribution, which can be used to launch Linux processes
94
95 -## Relaying the linux process's input and output to Windows
95 +## Relaying the Linux process's input and output to Windows
96
97 -Once the user's linux process has been created, [wslservice.exe](wslservice.exe.md) can return from `CreateLxProcess()` back to [wsl.exe](wsl.exe.md). In the case of WSL2, [wsl.exe](wsl.exe.md) receives the following HANDLES:
97 +Once the user's Linux process has been created, [wslservice.exe](wslservice.exe.md) can return from `CreateLxProcess()` back to [wsl.exe](wsl.exe.md). In the case of WSL2, [wsl.exe](wsl.exe.md) receives the following HANDLES:
98
99 - STDIN
100 - STDOUT
@@ -104,7 +104,7 @@ Once the user's linux process has been created, [wslservice.exe](wslservice.exe.
104
105 The `STDIN`, `STDOUT` and `STDERR` handles are used to relay input and output from the Linux process to the Windows terminal. Depending on the type of handle (terminal, pipe, file, ...), [wsl.exe](wsl.exe.md) will apply different relaying logics (see `src/windows/common/relay.cpp`) to achieve the best compatibility between Windows & Linux.
106
107 -The `Control channel` is used to notify the linux process of a change in the terminal (for instance when [wsl.exe's](wsl.exe.md) terminal window is resized) so these changes can be applied to the Linux process as well.
107 +The `Control channel` is used to notify the Linux process of a change in the terminal (for instance when [wsl.exe's](wsl.exe.md) terminal window is resized) so these changes can be applied to the Linux process as well.
108
109 The `Interop channel` has two usages:
110
doc/docs/technical-documentation/drvfs.md
+3 -3
@@ -8,7 +8,7 @@ Within a distribution, WSL separates between Linux processes that have been crea
8
9 This is done by having two separate [mount namespaces](https://man7.org/linux/man-pages/man7/mount_namespaces.7.html) within the distribution. One of them offers an elevated access to Windows drives, and the other offers a non-elevated access to Windows drives.
10
11 -When a Linux process is created, [wslservice.exe](wslservice.exe.md) determines its elevation status, and then tell [init](init.md) to create the process in the appropriate mount namespace.
11 +When a Linux process is created, [wslservice.exe](wslservice.exe.md) determines its elevation status, and then tells [init](init.md) to create the process in the appropriate mount namespace.
12
13 ## Mounting a Windows drive
14
@@ -18,7 +18,7 @@ When a [session leader](session-leader.md) is created, [wslservice.exe](wslservi
18
19 When the WSL distribution is created, [wslservice.exe](wslservice.exe.md) uses the `LX_INIT_CONFIGURATION_INFORMATION` message to indicate whether the process that created the distribution is elevated or not. Based on this, [init](init.md) will mount either the elevated, or un-elevated version of the plan9 server.
20
21 -Later when the first command is created in the namespace that hasn't been mounted yet, (either elevated, or non-elevated), [wslservice.exe](wslservice.exe.md) sends a `LxInitMessageRemountDrvfs` to [init](init.md), which tell `init` to mount the other namespace.
21 +Later when the first command is created in the namespace that hasn't been mounted yet, (either elevated, or non-elevated), [wslservice.exe](wslservice.exe.md) sends a `LxInitMessageRemountDrvfs` to [init](init.md), which tells `init` to mount the other namespace.
22
23 See: `src/windows/service/exe/WslCoreInstance.cpp` and `src/linux/drvfs.cpp`.
24
@@ -32,4 +32,4 @@ mount -t drvfs C: /tmp/my-mount-point
32
33 Internally, this is handled by `/usr/sbin/mount.drvfs`, which is a symlink to `/init`. When `/init` starts, it looks at `argv[0]` to determine which entrypoint to run. If `argv[0]` is `mount.drvfs`, then `/init` runs the `mount.drvfs` entrypoint (see `MountDrvfsEntry()` in `src/linux/init/drvfs.cpp`).
34
35 -Depending on the distribution configuration, `mount.drvfs` will either mount the drive as `drvfs` (WSL1), or `plan9`, `virtio-plan9` or `virtiofs` (WSL), depending on [.wslconfig](https://learn.microsoft.com/windows/wsl/wsl-config).
\ No newline at end of file
35 +Depending on the distribution configuration, `mount.drvfs` will either mount the drive as `drvfs` (WSL1), or `plan9`, `virtio-plan9` or `virtiofs` (WSL), depending on [.wslconfig](https://learn.microsoft.com/windows/wsl/wsl-config).
\ No newline at end of file
doc/docs/technical-documentation/index.md
+1 -1
@@ -1,6 +1,6 @@
1 # WSL Overview
2
3 -WSL is comprised of a set of executables, API's and protocols. This page offers an overview of the different components, and how they're connected.
3 +WSL is comprised of a set of executables, APIs and protocols. This page offers an overview of the different components, and how they're connected.
4 Click on any component to get more details.
5
6
doc/docs/technical-documentation/init.md
+1 -1
@@ -29,7 +29,7 @@ Once started, the `init` process performs various initialization tasks such as:
29
30 ## Running the distribution
31
32 -Once ready, `init` establishes either an `lxbus` (WSL1) or an `hvsocket` (WSL2) connection to [wslservice](wslservice.exe.md). This channel is used to transmit various commands to `init` (see `src/shared/inc/lxinitshared.h`), such as:
32 +Once ready, `init` establishes either an `lxbus` (WSL1) or an `hvsocket` (WSL2) connection to [wslservice](wslservice.exe.md). This channel is used to transmit various commands to `init` (see `src/shared/inc/lxinitshared.h`), such as:
33
34 - `LxInitMessageInitialize`: Configure the distribution
35 - `LxInitMessageCreateSession`: Create a new session leader. See [session leader](session-leader.md)
doc/docs/technical-documentation/localhost.md
+1 -1
@@ -1,6 +1,6 @@
1 # Localhost
2
3 -`localhost` is a WSL2 linux process, created by [mini_init](mini_init.md). Its role is to forward network traffic between the WSL2 virtual machine, and Windows.
3 +`localhost` is a WSL2 Linux process, created by [mini_init](mini_init.md). Its role is to forward network traffic between the WSL2 virtual machine, and Windows.
4
5
6 ## NAT networking
doc/docs/technical-documentation/plan9.md
+1 -1
@@ -1,6 +1,6 @@
1 # Plan 9
2
3 -Plan9 is a linux process that hosts a plan9 filesystem server for WSL1 and WSL2 distributions. It's created by [init](init.md) in each distribution.
3 +Plan9 is a Linux process that hosts a plan9 filesystem server for WSL1 and WSL2 distributions. It's created by [init](init.md) in each distribution.
4
5 ## WSL 1
6
doc/docs/technical-documentation/relay.md
+2 -2
@@ -1,6 +1,6 @@
1 # Relay
2
3 -Relay is a WSL2 linux process created by a [session leader](session-leader.md). Its job is to create a linux process on behalf of the user, and relay its output back to Windows.
3 +Relay is a WSL2 Linux process created by a [session leader](session-leader.md). Its job is to create a Linux process on behalf of the user, and relay its output back to Windows.
4
5 ## Creating a user process
6
@@ -10,7 +10,7 @@ These channels are used to:
10
11 - Relay standard file descriptors (stdin, stdout, stderr)
12 - Relay information about the terminal (for instance when the terminal window is resized from Windows)
13 -- Notify Windows when the linux process exits
13 +- Notify Windows when the Linux process exits
14
15 Once those channels are configured, the `relay` forks() into two processes:
16
doc/docs/technical-documentation/session-leader.md
+1 -1
@@ -21,6 +21,6 @@ When running in a WSL1 distribution, the session leader forks(), and uses the ch
21 - The current directory
22 - The standard file descriptors (stdin, stdout, stderr)
23
24 -## Creating a WSL2 process
24 +### Creating a WSL2 process
25
26 When running in a WSL2 distribution, the session leader forks() to create a [relay](relay.md) process, which is responsible for creating the user process and relaying its output back to [wsl.exe](wsl.exe.md)
\ No newline at end of file
doc/docs/technical-documentation/systemd.md
+1 -1
@@ -13,7 +13,7 @@ After launching `/sbin/init`, [init](init.md) waits for systemd to be ready by w
13
14 ## User sessions
15
16 -When systemd is enabled, WSL tries synchronizes launching processes with systemd user sessions. This is currently done by launching `login -f <user>` to start the associated systemd user session.
16 +When systemd is enabled, WSL tries to synchronize launching processes with systemd user sessions. This is currently done by launching `login -f <user>` to start the associated systemd user session.
17
18 ## Additional systemd configuration
19
doc/docs/technical-documentation/wslhost.exe.md
+1 -1
@@ -16,7 +16,7 @@ See: `src/windows/common/notifications.cpp`
16
17 ## Background processes
18
19 -When [wsl.exe](wsl.exe.md) terminates before the associated Linux processes terminates, `wslhost.exe` takes over the lifetime of the Linux process.
19 +When [wsl.exe](wsl.exe.md) terminates before the associated Linux process terminates, `wslhost.exe` takes over the lifetime of the Linux process.
20
21 This allows Linux processes to keep running Windows commands and access the terminal even after the associated `wsl.exe` terminates.
22
intune/WSL.admx
+2 -2
@@ -31,7 +31,7 @@
31 </disabledValue>
32 </policy>
33
34 - <policy name="AllowWSL1" class="Machine" displayName="$(string.AllowWSL1)" explainText="$(string.AllowWSL1Explain)" key="Software\Policies\WSL" valueName="AllowWSL1">
34 + <policy name="AllowWSL1" class="Machine" displayName="$(string.AllowWSL1)" explainText="$(string.AllowWSL1Explain)" key="Software\Policies\WSL" valueName="AllowWSL1">
35 <parentCategory ref="WSL" />
36 <supportedOn ref="windows:SUPPORTED_Windows10" />
37 <enabledValue>
@@ -42,7 +42,7 @@
42 </disabledValue>
43 </policy>
44
45 - <policy name="CustomKernelUserSettingConfigurable" class="Machine" displayName="$(string.CustomKernelUserSettingConfigurable)" explainText="$(string.CustomKernelExplain)" key="Software\Policies\WSL" valueName="AllowKernelUserSetting">
45 + <policy name="CustomKernelUserSettingConfigurable" class="Machine" displayName="$(string.CustomKernelUserSettingConfigurable)" explainText="$(string.CustomKernelExplain)" key="Software\Policies\WSL" valueName="AllowKernelUserSetting">
46 <parentCategory ref="WSL" />
47 <supportedOn ref="windows:SUPPORTED_Windows10" />
48 <enabledValue>
intune/en-US/WSL.adml
+5 -5
@@ -5,13 +5,13 @@
5 <description>Windows Subsystem for Linux</description>
6 <resources>
7 <stringTable>
8 - <string id="WindowsSubsystemForLinux">Windows Subsystem For Linux</string>
8 + <string id="WindowsSubsystemForLinux">Windows Subsystem for Linux</string>
9
10 - <string id="AllowWSL">Allow the Windows Subsystem For Linux</string>
11 - <string id="AllowWSLExplain">When set to disabled, this policy disables access to the Windows Subsystem For Linux for all users on the machine.</string>
10 + <string id="AllowWSL">Allow the Windows Subsystem for Linux</string>
11 + <string id="AllowWSLExplain">When set to disabled, this policy disables access to the Windows Subsystem for Linux for all users on the machine.</string>
12
13 - <string id="AllowInboxWSL">Allow the Inbox version of the Windows Subsystem For Linux</string>
14 - <string id="AllowInboxWSLExplain">When set to disabled, this policy disables the inbox version (optional component) of the Windows Subsystem For Linux. If this policy is disabled, only the store version of WSL can be used.</string>
13 + <string id="AllowInboxWSL">Allow the Inbox version of the Windows Subsystem for Linux</string>
14 + <string id="AllowInboxWSLExplain">When set to disabled, this policy disables the inbox version (optional component) of the Windows Subsystem for Linux. If this policy is disabled, only the store version of WSL can be used.</string>
15
16 <string id="AllowWSL1">Allow WSL1</string>
17 <string id="AllowWSL1Explain">When set to disabled, this policy disables WSL1. When disabled, only WSL2 distributions can be used.</string>
localization/strings/en-GB/Resources.resw
+2 -2
@@ -722,7 +722,7 @@ The system may need to be restarted so the changes can take effect.</value>
722 <value>Bridged networking requires wsl2.vmSwitch to be set.</value>
723 </data>
724 <data name="MessageCouldFetchDistributionList" xml:space="preserve">
725 - <value>Failed to fetch the list distribution from '{}'. {}</value>
725 + <value>Failed to fetch the distribution list from '{}'. {}</value>
726 <comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
727 </data>
728 <data name="MessageFailedToAttachDisk" xml:space="preserve">
@@ -1055,7 +1055,7 @@ Falling back to NAT networking.</value>
1055 <comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
1056 </data>
1057 <data name="MessageCorruptedDistroRegistration" xml:space="preserve">
1058 - <value>Failed to read property '{}' from distribution {} </value>
1058 + <value>Failed to read property '{}' from distribution {}</value>
1059 <comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
1060 </data>
1061 <data name="MessagePassVhdFlag" xml:space="preserve">
localization/strings/en-US/Resources.resw
+2 -2
@@ -722,7 +722,7 @@ The system may need to be restarted so the changes can take effect.</value>
722 <value>Bridged networking requires wsl2.vmSwitch to be set.</value>
723 </data>
724 <data name="MessageCouldFetchDistributionList" xml:space="preserve">
725 - <value>Failed to fetch the list distribution from '{}'. {}</value>
725 + <value>Failed to fetch the distribution list from '{}'. {}</value>
726 <comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
727 </data>
728 <data name="MessageFailedToAttachDisk" xml:space="preserve">
@@ -1055,7 +1055,7 @@ Falling back to NAT networking.</value>
1055 <comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
1056 </data>
1057 <data name="MessageCorruptedDistroRegistration" xml:space="preserve">
1058 - <value>Failed to read property '{}' from distribution {} </value>
1058 + <value>Failed to read property '{}' from distribution {}</value>
1059 <comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
1060 </data>
1061 <data name="MessagePassVhdFlag" xml:space="preserve">
src/windows/inc/WmiService.h
+1 -1
@@ -760,7 +760,7 @@ public:
760 }
761
762 // Allows for executing a WMI query against the WMI service for an enumeration of WMI objects.
763 - // Assumes the query of of the WQL query language.
763 + // Assumes the query is of the WQL query language.
764 const WmiEnumerate& query(_In_ PCWSTR query)
765 {
766 THROW_IF_FAILED(m_wbemServices->ExecQuery(
test/windows/UnitTests.cpp
+2 -2
@@ -1407,13 +1407,13 @@ class UnitTests
1407
1408 ValidateErrorMessage(
1409 L"--install -d ubuntu",
1410 - L"Failed to fetch the list distribution from 'http://127.0.0.1:6666'. " +
1410 + L"Failed to fetch the distribution list from 'http://127.0.0.1:6666'. " +
1411 GetSystemErrorString(HRESULT_FROM_WIN32(WININET_E_CANNOT_CONNECT)),
1412 L"Wsl/InstallDistro/WININET_E_CANNOT_CONNECT");
1413
1414 ValidateErrorMessage(
1415 L"--list --online",
1416 - L"Failed to fetch the list distribution from 'http://127.0.0.1:6666'. " +
1416 + L"Failed to fetch the distribution list from 'http://127.0.0.1:6666'. " +
1417 GetSystemErrorString(HRESULT_FROM_WIN32(WININET_E_CANNOT_CONNECT)),
1418 L"Wsl/WININET_E_CANNOT_CONNECT");
1419 }