Skip to content

Commit 80dd0a8

Browse files
Merge branch 'master' into patch-1
2 parents 21f7819 + ba52d67 commit 80dd0a8

13 files changed

Lines changed: 127 additions & 14 deletions

WSL/about.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ ms.localizationpriority: high
1010

1111
# What is the Windows Subsystem for Linux?
1212

13-
The Windows Subsystem for Linux lets developers run a GNU/Linux environment -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a virtual machine.
13+
The Windows Subsystem for Linux lets developers run a GNU/Linux environment -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a traditional virtual machine or dualboot setup.
1414

1515
You can:
1616

1717
* Choose your favorite GNU/Linux distributions [from the Microsoft Store](https://aka.ms/wslstore).
1818
* Run common command-line tools such as `grep`, `sed`, `awk`, or other ELF-64 binaries.
1919
* Run Bash shell scripts and GNU/Linux command-line applications including:
2020
* Tools: vim, emacs, tmux
21-
*Languages: [NodeJS](https://docs.microsoft.com/windows/nodejs/setup-on-wsl2), Javascript, [Python](https://docs.microsoft.com/windows/python/web-frameworks), Ruby, C/C++, C# & F#, Rust, Go, etc.
22-
*Services: SSHD, MySQL, Apache, lighttpd, [MongoDB](https://docs.microsoft.com/windows/nodejs/databases), [PostgreSQL](https://docs.microsoft.com/windows/python/databases).
21+
* Languages: [NodeJS](https://docs.microsoft.com/windows/nodejs/setup-on-wsl2), Javascript, [Python](https://docs.microsoft.com/windows/python/web-frameworks), Ruby, C/C++, C# & F#, Rust, Go, etc.
22+
* Services: SSHD, MySQL, Apache, lighttpd, [MongoDB](https://docs.microsoft.com/windows/nodejs/databases), [PostgreSQL](https://docs.microsoft.com/windows/python/databases).
2323
* Install additional software using own GNU/Linux distribution package manager.
2424
* Invoke Windows applications using a Unix-like command-line shell.
2525
* Invoke GNU/Linux applications on Windows.

WSL/file-permissions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,4 @@ Any files created, modified, or accessed in the Linux root file system follow st
103103

104104
You can configure your file permissions inside of your Windows drives using the mount options in wsl.conf. The mount options allow you to set `umask`, `dmask` and `fmask` permissions masks. The `umask` is applied to all files, the `dmask` is applied just to directories and the `fmask` is applied just to files. These permission masks are then put through a logical OR operation when being applied to files, e.g: If you have a `umask` value of `023` and an `fmask` value of `022` then the resulting permissions mask for files will be `023`.
105105

106-
Please see the [Configure launch settings with wslconf](./wsl-config.md#configure-launch-settings-with-wslconf) article for instructions on how to do this.
106+
Please see the [Configure per distro launch settings with wslconf](./wsl-config.md#configure-per-distro-launch-settings-with-wslconf) article for instructions on how to do this.

WSL/install-win10.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To only install WSL 1, you should now restart your machine and move on to [Insta
2323

2424
## Update to WSL 2
2525

26-
To update to WSL 2, you must meet the follow criteria:
26+
To update to WSL 2, you must meet the following criteria:
2727

2828
- Running Windows 10, [updated to version 2004](ms-settings:windowsupdate), **Build 19041** or higher.
2929

@@ -49,7 +49,7 @@ Run the following command in PowerShell to set WSL 2 as the default version when
4949
wsl --set-default-version 2
5050
```
5151

52-
You might see this message after running that command: `WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel` please follow the link and install the MSI from that page on our documentation to install a Linux kernel on your machine for WSL 2 to use. Once you have the kernel installed, please run the command again and it should complete successfully without showing the message.
52+
You might see this message after running that command: `WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel`. Please follow the link ([https://aka.ms/wsl2kernel](https://aka.ms/wsl2kernel)) and install the MSI from that page on our documentation to install a Linux kernel on your machine for WSL 2 to use. Once you have the kernel installed, please run the command again and it should complete successfully without showing the message.
5353

5454
> [!NOTE]
5555
> The update from WSL 1 to WSL 2 may take several minutes to complete depending on the size of your targeted distribution. If you are running an older (legacy) installation of WSL 1 from Windows 10 Anniversary Update or Creators Update, you may encounter an update error. Follow these instructions to [uninstall and remove any legacy distributions](https://docs.microsoft.com/windows/wsl/install-legacy#uninstallingremoving-the-legacy-distro).

WSL/kernel-release-notes.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
title: Release Notes for Windows Subsystem for Linux kernel
33
description: Release notes for the Windows Subsystem for Linux. Updated monthly.
44
keywords: release notes, wsl, windows, windows subsystem for linux, windowssubsystem, ubuntu, kernel
5-
author: crloewen
65
ms.date: 06/09/2020
76
ms.topic: article
87
ms.localizationpriority: high
@@ -15,7 +14,7 @@ We've added support for WSL 2 distributions, [which use a full Linux kernel](htt
1514
## 4.19.121-microsoft-standard
1615
*Release Date*: Prerelease
1716

18-
[Official Github release link](https://github.com/microsoft/WSL2-Linux-Kernel/releases/tag/4.19.104-microsoft-standard).
17+
[Official Github release link](https://github.com/microsoft/WSL2-Linux-Kernel/releases/tag/4.19.121-microsoft-standard).
1918

2019
* Drivers: hv: vmbus: hook up dxgkrnl
2120
* Added support for GPU Compute

WSL/media/wsl2-network-l2w.png

45.8 KB
Loading

WSL/release-notes.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ ms.localizationpriority: high
1010

1111
# Release Notes for Windows Subsystem for Linux
1212

13+
## Build 20150
14+
For general Windows information on build 20150 visit the [Windows blog](https://blogs.windows.com/windowsexperience/2020/06/17/announcing-windows-10-insider-preview-build-20150/).
15+
16+
* WSL2 GPU compute see [Windows blog](https://blogs.windows.com/windowsexperience/2020/06/17/announcing-windows-10-insider-preview-build-20150/) for more information.
17+
* Introduce wsl.exe --install command line option to easily set up WSL.
18+
* Introduce wsl.exe --update command line option to manage updates to the WSL2 kernel.
19+
* Set WSL2 as the default.
20+
* Increase WSL2 vm graceful shutdown timeout.
21+
* Fix virtio-9p race condition when mapping device memory.
22+
* Don't run an elevated 9p server if UAC is disabled.
23+
1324
## Build 19640
1425
For general Windows information on build 19640 visit the [Windows blog](https://blogs.windows.com/windowsexperience/2020/06/03/announcing-windows-10-insider-preview-build-19640/).
1526

WSL/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
href: tutorials/wsl-vscode.md
2323
- name: Get started with Git
2424
href: tutorials/wsl-git.md
25+
- name: Set up GPU acceleration (NVIDIA CUDA/DirectML)
26+
href: tutorials/gpu-compute.md
2527
- name: How-to
2628
items:
2729
- name: Interoperability commands

WSL/troubleshooting.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,41 @@ Lastly, if your issue is related to the Windows Terminal, Windows Console, or th
3636

3737
## Common issues
3838

39+
### Cannot access WSL files from Windows
40+
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.
41+
42+
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:
43+
44+
```
45+
[ 0.363323] 9p: Installing v9fs 9p2000 file system support
46+
[ 0.363336] FS-Cache: Netfs '9p' registered for caching
47+
[ 0.398989] 9pnet: Installing 9P2000 support
48+
```
49+
50+
Please see [this Github thread](https://github.com/microsoft/wsl/issues/5307) for further discussion on this issue.
51+
52+
### Can't start WSL 2 distro and only see 'WSL 2' in output
53+
If your display language is not English, then it is possible you are seeing a truncated version of an error text.
54+
55+
```powershell
56+
C:\Users\me>wsl
57+
WSL 2
58+
```
59+
60+
To resolve this issue, please visit `https://aka.ms/wsl2kernel` and install the kernel manually by following the directions on that doc page.
61+
62+
### Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
63+
64+
1. Check the [Hyper-V system requirements](https://docs.microsoft.com/windows-server/virtualization/hyper-v/system-requirements-for-hyper-v-on-windows#:~:text=on%20Windows%20Server.-,General%20requirements,the%20processor%20must%20have%20SLAT.)
65+
2. If your machine is a VM, please enable [nested virtualization](https://docs.microsoft.com/windows/wsl/wsl2-faq#can-i-run-wsl-2-in-a-virtual-machine) manually. Launch powershell with admin, and run:
66+
67+
```powershell
68+
Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true
69+
```
70+
71+
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.
72+
4. Restart your machine after enabling the `Virtual Machine Platform` optional component.
73+
3974
### Bash loses network connectivity once connected to a VPN
4075

4176
If after connecting to a VPN on Windows, bash loses network connectivity, try this workaround from within bash. This workaround will allow you to manually override the DNS resolution through `/etc/resolv.conf`.

WSL/tutorials/gpu-compute.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: GPU accelerated Machine Learning training in the Windows Subsystem for Linux
3+
description: Learn more about WSL 2 support for NVIDIA CUDA, DirectML, Tensorflow, and PyTorch.
4+
keywords: wsl, windows, windows subsystem, gpu compute, gpu acceleration, NVIDIA, CUDA, DirectML, Tensorflow, PyTorch, NVIDIA CUDA preview, GPU driver, NVIDIA Container Toolkit, Docker
5+
ms.date: 06/17/2020
6+
ms.topic: article
7+
ms.localizationpriority: medium
8+
---
9+
10+
# GPU accelerated machine learning training in the Windows Subsystem for Linux
11+
12+
Support for GPU compute, the #1 most requested WSL feature, is now available for preview via the Windows Insider program. [Read the blog post](https://blogs.windows.com/windowsdeveloper/?p=55781).
13+
14+
## What is GPU compute?
15+
16+
Leveraging GPU acceleration for compute-intensive tasks is generally referred to as "GPU compute". GPU computing leverages the GPU (graphics processing unit) to accelerate math heavy workloads and uses its parallel processing to complete the required calculations faster, in many cases, than utilizing only a CPU. This parallelization enables significant processing speed improvements for these math heavy workloads then when running on a CPU. Training machine learning models is a great example in which GPU compute can significantly accelerate the time to complete this computationally expensive task.
17+
18+
## Install and set up
19+
20+
Learn more about WSL 2 support and how to start training machine learning models in the [GPU Accelerated Training guide](https://docs.microsoft.com/windows/win32/direct3d12/gpu-accelerated-training) inside the DirectML docs. This guide covers:
21+
22+
* Guidance for beginners or students to set up TensorFlow with DirectML
23+
* Guidance for professionals to start running their exisiting CUDA ML workflows

WSL/tutorials/wsl-git.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,32 @@ You will need to install Git on each file system that you intend to use it with.
3131

3232
## Installing Git
3333

34-
Git comes already installed with most of the Windows Subsystem for Linux distributions, however, you may want to update to the latest version and you will need to set up your git config file.
34+
Git comes already installed with most of the Windows Subsystem for Linux distributions, however, you may want to update to the latest version. You also will need to set up your git config file.
3535

36-
To install Git, see the [Git Download for Linux](https://git-scm.com/download/linux) site. Each Linux distribution has their own package manager and install command. For example, to install Git on the Alpine distribution, use: `apk add git`. You also may want to [install Git for Windows](https://git-scm.com/download/win) if you haven't already.
36+
To install Git, see the [Git Download for Linux](https://git-scm.com/download/linux) site. Each Linux distribution has their own package manager and install command.
37+
38+
For the latest stable GIt version in Ubuntu/Debian, enter the command:
39+
40+
```bash
41+
sudo apt-get install git
42+
```
43+
44+
> [!NOTE]
45+
> You also may want to [install Git for Windows](https://git-scm.com/download/win) if you haven't already.
3746
3847
## Git config file setup
3948

40-
To set up your Git config file, open a command line for the distribution you're working in and enter: `git config --global user.name "Your Name"` and then, `git config --global user.email "[email protected]"`. Replacing the content in quotations with the name and email address that you used to create your Git account.
49+
To set up your Git config file, open a command line for the distribution you're working in and set your name with this command (replacing "Your Name" with your Git username):
50+
51+
```bash
52+
`git config --global user.name "Your Name"`
53+
```
54+
55+
Set your email with this command (replacing "[email protected]" with the email you use on your Git account):
56+
57+
```bash
58+
`git config --global user.email "[email protected]"`
59+
```
4160

4261
> [!TIP]
4362
> If you don't yet have a Git account, you can [sign-up for one on GitHub](https://github.com/join). If you've never worked with Git before, [GitHub Guides](https://guides.github.com/) can help you get started. If you need to edit your git config, you can do so with a built-in text editor like nano: `nano ~/.gitconfig`.
@@ -56,9 +75,12 @@ git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/libexec
5675

5776
Now any git operation you perform within your WSL distribution will use the credential manager. If you already have credentials cached for a host, it will access them from the credential manager. If not, you'll receive a dialog response requesting your credentials, even if you're in a Linux console.
5877

78+
> [!NOTE]
79+
> If you are using a GPG key for code signing security, you may need to [associate your GPG key with your GitHub email](https://help.github.com/en/github/authenticating-to-github/associating-an-email-with-your-gpg-key).
80+
5981
## Adding a Git Ignore file
6082

61-
We recommend adding a [.gitignore file](https://help.github.com/en/articles/ignoring-files) to your projects. GitHub offers [a collection of useful .gitignore templates](https://github.com/github/gitignore) with recommended .gitignore file setups organized according to your use-case.
83+
We recommend adding a [.gitignore file](https://help.github.com/en/articles/ignoring-files) to your projects. GitHub offers [a collection of useful .gitignore templates](https://github.com/github/gitignore) with recommended .gitignore file setups organized according to your use-case. For example, here is [GitHub's default gitignore template for a Node.js project](https://github.com/github/gitignore/blob/master/Node.gitignore).
6284

6385
If you choose to [create a new repo using the GitHub website](https://help.github.com/articles/create-a-repo), there are check boxes available to initialize your repo with a README file, .gitignore file set up for your specific project type, and options to add a license if you need one.
6486

0 commit comments

Comments
 (0)