Skip to content

Commit fdeaf1b

Browse files
author
Rich Turner
committed
Merge branch 'live'
2 parents 0b602c8 + d196611 commit fdeaf1b

20 files changed

Lines changed: 452 additions & 182 deletions

WSL/TOC.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# [About the Windows Subsystem for Linux](./about.md)
22
# [Install on Windows 10](./install-win10.md)
33
# [Install on Windows Server](./install-on-server.md)
4+
# [Initialize Distro](./initialize-distro.md)
45
# [User accounts and permissions](./user-support.md)
56
# [Distro management](./wsl-config.md)
67
# [Interoperability](./interop.md)
78
# [Build a Custom Distro](./build-custom-distro.md)
89
# [Frequently Asked Questions](./faq.md)
910
# [Troubleshooting](./troubleshooting.md)
10-
# [Release Notes](./release-notes.md)
11+
# [Release Notes](./release-notes.md)

WSL/about.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Learn about the Windows Subsystem for Linux
33
description: Learn more about how the Windows Subsystem for Linux works.
4-
keywords: BashOnWindows, bash, wsl, windows, windowssubsystem
4+
keywords: BashOnWindows, bash, wsl, windows, windowssubsystem, gnu, linux
55
author: scooley
66
ms.author: scooley
77
ms.date: 7/11/2016
@@ -13,19 +13,19 @@ ms.assetid: 3cefe0db-7616-4848-a2b6-9296746a178b
1313

1414
# Windows Subsystem for Linux Documentation
1515

16-
The Windows Subsystem for Linux lets developers run Linux environments -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a virtual machine.
16+
The Windows Subsystem for Linux lets developers run GNU/Linux environment -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a virtual machine.
1717

1818
You can:
1919

20-
1. Choose your favorite Linux distributions [from the Windows Store](https://aka.ms/wslstore).
21-
1. Run common command-line utilities such as `grep`, `sed`, `awk`, etc.
22-
1. Run Bash shell scripts and Linux command-line applications including:
20+
1. Choose your favorite GNU/Linux distributions [from the Windows Store](https://aka.ms/wslstore).
21+
1. Run common command-line free software such as `grep`, `sed`, `awk`, or other ELF-64 binaries.
22+
1. Run Bash shell scripts and GNU/Linux command-line applications including:
2323
* Tools: vim, emacs, tmux
2424
* Languages: Javascript/node.js, Ruby, Python, C/C++, C# & F#, Rust, Go, etc.
2525
* Services: sshd, MySQL, Apache, lighttpd
26-
1. Install additional Linux tools using the distribution's built in package manager (`apt-get`, for example).
27-
1. Invoke Windows applications from the Linux console.
28-
1. Invoke Linux applications on Windows.
26+
1. Install additional software using own GNU/Linux distribution package manager.
27+
1. Invoke Windows applications using a Unix-like command-line shell.
28+
1. Invoke GNU/Linux applications on Windows.
2929

3030
## Getting started
3131

@@ -35,8 +35,8 @@ You can:
3535

3636
## Team Blogs
3737
* [Overview post with a collection of videos and blogs](https://blogs.msdn.microsoft.com/commandline/learn-about-windows-console-and-windows-subsystem-for-linux-wsl/)
38-
* [Command-Line blog](https://blogs.msdn.microsoft.com/commandline/)
39-
* [Windows Subsystem for Linux Blog](https://blogs.msdn.microsoft.com/wsl/)
38+
* [Command-Line blog](https://blogs.msdn.microsoft.com/commandline/) (Active)
39+
* [Windows Subsystem for Linux Blog](https://blogs.msdn.microsoft.com/wsl/) (Historical)
4040

4141
## Posts & Articles
4242
* [Run Bash on Ubuntu on Windows](https://blogs.windows.com/buildingapps/2016/03/30/run-bash-on-ubuntu-on-windows/)

WSL/curl-distro.png

17.5 KB
Loading

WSL/faq.md

Lines changed: 54 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
title: Frequently Asked Questions (FAQ)
33
description: Frequently Asked Questions about the Windows Subsystem for Linux.
4-
keywords: BashOnWindows, bash, wsl, windows, windowssubsystem
5-
author: scooley
6-
ms.author: scooley
7-
ms.date: 7/31/2017
4+
keywords: BashOnWindows, bash, wsl, windows, windowssubsystem, faq
5+
author: taraj
6+
ms.author: taraj
7+
ms.date: 9/4/2018
88
ms.topic: article
99
ms.prod: windows-subsystem-for-linux
1010
ms.service: windows-subsystem-for-linux
@@ -13,15 +13,15 @@ ms.assetid: 129101ed-b88a-43c2-b6a2-cd2c4ff6fee1
1313

1414
# Frequently Asked Questions
1515

16-
### What is Windows Subsystem for Linux (WSL)?
16+
## What is Windows Subsystem for Linux (WSL)?
1717
The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.
1818

1919
See the [about page](./about.md) for more details.
2020

21-
### Who is this for?
22-
This is primarily a tool for developers -- especially web developers and those who work on or with open source projects. This allows those who want/need to use Bash, common Linux tools (`sed`, `awk`, etc.) and many Linux-first tools (Ruby, Python, etc.) to use their toolchain on Windows.
21+
## Who is WSL for?
22+
This is primarily a tool for developers -- especially web developers and those who work on or with open source projects. This allows those who want/need to use Bash, common Linux tools (`sed`, `awk`, etc.) and many Linux-first tools (Ruby, Python, etc.) to use their toolchain on Windows.
2323

24-
### What can I do with WSL?
24+
## What can I do with WSL?
2525
WSL provides an application called Bash.exe that, when started, opens a Windows console running the Bash shell. Using Bash, you can run command-line Linux tools and apps. For example, type `lsb_release -a` and hit enter; you’ll see details of the Linux distro currently running:
2626

2727
![](media/distro.png)
@@ -30,83 +30,72 @@ You can also access your local machine’s filesystem from within the Linux Bash
3030

3131
![](media/ls.png)
3232

33-
### What is Bash?
33+
## What is Bash?
3434
[Bash](https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29) is a popular text-based shell and command-language. It is the default shell included within Ubuntu and other Linux distros, and in macOS. Users type commands into a shell to execute scripts and/or run commands and tools to accomplish many tasks.
3535

36-
### How does this work?
36+
## How does this work?
3737
Check out our [blog](https://blogs.msdn.microsoft.com/wsl/) where we go into detail about the underlying technology.
3838

39-
### Why would I use WSL rather than Linux in a VM?
39+
## Why would I use WSL rather than Linux in a VM?
4040
WSL requires fewer resources (CPU, memory, and storage) than a full virtual machine. WSL also allows you to run Linux command-line tools and apps alongside your Windows command-line, desktop and store apps, and to access your Windows files from within Linux. This enables you to use Windows apps and Linux command-line tools on the same set of files if you wish.
4141

42-
### Why would I use, for example, Ruby on Linux instead of on Windows?
42+
## Why would I use, for example, Ruby on Linux instead of on Windows?
4343
Some cross-platform tools were built assuming that the environment in which they run behaves like Linux. For example, some tools assume that they are able to access very long file paths or that specific files/folders exist. This often causes problems on Windows which often behaves differently from Linux.
4444

4545
Many languages like Ruby and node are often ported to, and run great, on Windows. However, not all of the Ruby Gem or node/NPM library owners port their libraries to support Windows, and many have Linux-specific dependencies. This can often result in systems built using such tools and libraries suffering from build and sometimes runtime errors or unwanted behaviors on Windows.
4646

4747
These are just some of issues that caused many people to ask Microsoft to improve Windows’ command-line tools and what drove us to partner with Canonical to enable native Bash and Linux command-line tools to run on Windows.
4848

49-
### What does this mean for PowerShell?
50-
While working with OSS projects, there are numerous scenarios where it’s immensely useful to drop into Bash from a PowerShell prompt. Bash support is complementary and strengthens the value of the command-line on Windows, allowing PowerShell and the PowerShell community to leverage other popular technologies.
49+
## What does this mean for PowerShell?
50+
While working with OSS projects, there are numerous scenarios where it’s immensely useful to drop into Bash from a PowerShell prompt. Bash support is complementary and strengthens the value of the command-line on Windows, allowing PowerShell and the PowerShell community to leverage other popular technologies.
5151

5252
Read more on the PowerShell team blog -- [Bash for Windows: Why it’s awesome and what it means for PowerShell](https://blogs.msdn.microsoft.com/powershell/2016/04/01/bash-for-windows-why-its-awesome-and-what-it-means-for-powershell/)
5353

54-
### Can I run ALL Linux apps in WSL?
55-
No! WSL is a tool aimed at enabling users who need them to run Bash and core Linux command-line tools on Windows.
54+
## Can I run ALL Linux apps in WSL?
55+
No! WSL is a tool aimed at enabling users who need them to run Bash and core Linux command-line tools on Windows.
5656

5757
WSL does **not** aim to support GUI desktops or applications (e.g. Gnome, KDE, etc.)
5858

59-
Also, even though you will be able to run many popular server applications (e.g. Redis), we do not recommend WSL for server scenarios – Microsoft offers a variety of solutions for running production Ubuntu workloads in Azure, Hyper-V, and Docker.
59+
Also, even though you will be able to run many popular server applications (e.g. Redis), we do not recommend WSL for hosting production services – Microsoft offers a variety of solutions for running production Linux workloads in Azure, Hyper-V, and Docker.
60+
61+
## What Windows SKUs is WSL included in?
62+
Windows Subsystem for Linux is available on the desktop version of Windows for Windows 10 Anniversary and Creators update or later.
6063

61-
### What Windows SKUs is WSL included in?
62-
Windows Subsystem for Linux is available on the desktop version of Windows for the Anniversary and Creators update or later.
6364
Beginning in the Fall Creators update WSL will be available on both the desktop and server SKUs of Windows.
6465

65-
### What processors do we support?
66-
We only support x64 CPUs.
66+
## What processors does WSL support?
67+
WSL supports x64 and ARM CPUs.
6768

68-
### How do I access my C drive?
69+
## How do I access my C: drive?
6970
Mount points for hard drives on the local machine are automatically created and provide easy access to the Windows filesystem.
7071

7172
**/mnt/\<drive letter>/**
7273

7374
Example usage would be `cd /mnt/c` to access c:\
7475

75-
### How do I use a Windows file with a Linux app?
76-
77-
One of the benefits of WSL is being able to use the same file with both Windows and Linux apps or tools.
78-
79-
One of the main limitations of using WSL is that changing Linux files with a Windows app or tool is not allowed. See: [Do not change Linux files using Windows apps and tools](https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/)
80-
81-
However changing Windows files with a Linux app or tools is allowed.
82-
83-
One way to use a Windows file with a Linux app is to use an absolute path, e.g. `/mnt/c/Users/<Windows User>/Documents/Projects/<filename>`.
84-
85-
However not all Linux apps or tools can access a file using `/mnt`.
76+
## How do I use a Windows file with a Linux app?
8677

87-
A solution is to create a [symbolic link](http://manpages.ubuntu.com/manpages/precise/man7/symlink.7.html).
78+
One of the benefits of WSL is being able to access your files via both Windows and Linux apps or tools.
8879

89-
Windows directory: `C:\Users\<Windows User>\Documents\Projects` Note: This directory exist.
80+
WSL mounts your machine's fixed drives under the `/mnt/<drive>` folder in your Linux distros. For example, your `C:` drive is mounted under `/mnt/c/`
9081

91-
Linux directory: `/home/<Linux User>/Projects` Note: This directory does not exist.
82+
Using your mounted drives, you can edit code in, for example, `C:\dev\myproj\` using [Visual Studio](https://visualstudio.microsoft.com/vs/) / or [VS Code](https://code.visualstudio.com/), and build/test that code in Linux by accessing the same files via `\mnt\c\dev\myproj`.
9283

93-
`ln -s "/mnt/c/Users/<Windows User>/Documents/Projects" /home/<Linux User>/Projects`
84+
> **IMPORTANT NOTE**: One of the key limitations of using WSL is that directly accessing/changing files in your Linux distros' filesystem using Windows apps or tools is not supported. See: [Do not change Linux files using Windows apps and tools](https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/)
9485
95-
Now in WSL you can access the Windows directory as `/home/<Linux User>/Projects` or a specific file as `/home/<Linux User>/Projects/<filename>`, and if in WSL the current directory is `~` then `Projects/<filename>`.
86+
## Are files in the Linux drive different from the mounted Windows drive?
9687

97-
### Are files in the Linux drive different from the mounted Windows drive?
98-
99-
1. Files under the Linux root (i.e. `/`) are controlled by the subsystem. This allows for Linux specific behavior including but is not limited to:
88+
1. Files under the Linux root (i.e. `/`) are controlled by WSL which mimics Linux specific behavior, including but not limited to:
10089
* Files which contain invalid Windows filename characters
10190
* Symlinks created for non-admin users
10291
* Changing file attributes through chmod and chown
103-
* Support case sensitivity
92+
* File/folder case sensitivity
10493

10594
2. Files in mounted drives are controlled by Windows and have the following behaviors:
10695
* Support case sensitivity
10796
* All permissions are set to best reflect the Windows permissions
10897

109-
### Why are there so many errors when I run apt-get upgrade?
98+
## Why are there so many errors when I run apt-get upgrade?
11099
Some packages use features that we haven't implemented yet. `udev`, for example, isn't supported yet and causes several `apt-get upgrade` errors.
111100

112101
To fix issues related to `udev`, follow the following steps:
@@ -131,51 +120,52 @@ To fix issues related to `udev`, follow the following steps:
131120
ln -s /bin/true /sbin/initctl
132121
```
133122

134-
### How do I uninstall WSL?
123+
## How do I uninstall a WSL Distribution?
135124

136-
Open a command prompt and run:
125+
On builds prior to 1709 (16299) open a command prompt and run:
137126
```batchfile
138127
lxrun /uninstall /full
139128
```
129+
130+
WSL distributions installed from the store can be uninstalled like any other Windows app, by right-clicking on the app tile and clicking Uninstall, or via PowerShell using the [`Remove-AppxPackage` cmdlet](https://technet.microsoft.com/en-us/library/hh856038.aspx).
140131

141-
### Why does ping require admin privileges?
142-
Fixed in Build 14926 and later.
132+
## Why does ping generate permission denied errors?
133+
In WSL builds < 14926, ping required WSL to run via an elevated Console. This issue was fixed in Build 14926 and later.
143134

144-
### How do I run an OpenSSH server?
135+
## How do I run an OpenSSH server?
145136
Administrator privileges in Windows are required to run OpenSSH in WSL. To run an OpenSSH server, run Bash on Ubuntu on Windows as an administrator, or run bash.exe from a CMD/PowerShell prompt with administrator privileges.
146137

147-
### Why do I get "Error: 0x80040306" when I try to install?
148-
This has to do with the fact that we do not support legacy console.
149-
To turn off legacy console:
138+
## Why do I get "Error: 0x80040306" when I try to install?
139+
WSL does not support running in a legacy console. To turn off legacy console:
150140

151-
1. Open cmd.exe
152-
1. Right click title bar -> Properties -> Uncheck Use legacy console
141+
1. Open WSL, PowerShell, or Cmd
142+
1. Right click title bar -> Properties -> Uncheck "Use legacy console"
153143
1. Click OK
154144

155-
### Why do I get "Error: 0x80040154" when I run bash.exe after upgrading Windows?
156-
The Windows Subsystem for Linux feature may be disabled during a Windows update. If this happens the Windows feature must be re-enabled. Instructions for enabling the Windows Subsystem for Linux can be found in the [Installation Guide](https://msdn.microsoft.com/en-us/commandline/wsl/install_guide#enable-the-windows-subsystem-for-linux-feature-guihttps://msdn.microsoft.com/en-us/commandline/wsl/install_guide#enable-the-windows-subsystem-for-linux-feature-gui).
145+
## Why do I get "Error: 0x80040154" when I run bash.exe after upgrading Windows?
146+
The "Windows Subsystem for Linux" feature may be disabled during a Windows update. If this happens the Windows feature must be re-enabled. Instructions for enabling the "Windows Subsystem for Linux" feature can be found in the [Installation Guide](https://msdn.microsoft.com/en-us/commandline/wsl/install_guide#enable-the-windows-subsystem-for-linux-feature-guihttps://msdn.microsoft.com/en-us/commandline/wsl/install_guide#enable-the-windows-subsystem-for-linux-feature-gui).
157147

158-
### How do I change the display language of WSL?
159-
WSL install will try to automatically change the Ubuntu locale to match the locale of your Windows install. If you do not want this behavior you can run this command to change the Ubuntu locale after install completes. You will have to relaunch bash.exe for this change to take effect.
148+
## How do I change the display language of WSL?
149+
WSL install will try to automatically change the Ubuntu locale to match the locale of your Windows install. If you do not want this behavior you can run this command to change the Ubuntu locale after install completes. You will have to relaunch bash.exe for this change to take effect.
160150

161151
The below example changes to locale to en-US:
162152
```bash
163153
sudo update-locale LANG=en_US.UTF8
164154
```
165155

166-
### Why do I get a Permission Denied error when using ping?
167-
Executing the PING command no longer requires admin privileges since Build 14926.
168-
169-
### Why do I not have internet access from WSL?
170-
Some users have reported issues with specific firewall applications blocking internet access in WSL. The firewalls reported are:
156+
## Why do I not have internet access from WSL?
157+
Some users have reported issues with specific firewall applications blocking internet access in WSL. The firewalls reported are:
171158

172159
1. Kaspersky
173160
1. AVG
174161
1. Avast
175162

176-
In some cases turning off the firewall allows for access. In some cases simply having the firewall installed looks to block access.
163+
In some cases turning off the firewall allows for access. In some cases simply having the firewall installed looks to block access.
164+
165+
## How do I access a port from WSL in Windows?
166+
WSL shares the IP address of Windows, as it is running on Windows. As such you can access any ports on localhost e.g. if you had web content on port 1234 you could http://localhost:1234 into your Windows browser.
177167

178-
### Where can I provide feedback?
168+
## Where can I provide feedback?
179169

180170
You can share feedback and ask questions through multiple channels:
181171
Feedback and questions should be directed to:

0 commit comments

Comments
 (0)