Often Asked Questions about Windows Subsystem for Linux


What is Windows Subsystem for Linux (WSL)?

The Windows Subsystem for Linux (WSL) is a feature of the Windows operating system that enables you to run a Linux file system, along with Linux command-line tools and GUI apps, directly on Windows, alongside your traditional Windows desktop and apps.

Meet the nigh folio for more details.

Who is WSL for?

This is primarily a tool for developers, particularly web developers, those working on open up source projects, or deploying to Linux server environments. WSL is for anyone who likes using Bash, mutual Linux tools (sed,
awk, etc.) and Linux-first frameworks (Ruddy, Python, etc.) just too enjoys using Windows productivity tools

What tin I practise with WSL?

WSL enables you to run Linux in a Bash trounce with your choice of distribution (Ubuntu, Debian, OpenSUSE, Kali, Tall, etc). Using Bash, you can run command-line Linux tools and apps. For instance, blazon
lsb_release -a
and hit enter; yous’ll run across details of the Linux distro currently running:

You can also access your local car’s file organisation from within the Linux Fustigate shell – you’ll find your local drives mounted under the
folder. For instance, your
drive is mounted under

Screenshot of mounted C drive

Could you describe a typical development workflow that incorporates WSL?

WSL targets a developer audition with the intent to exist used as role of an inner development loop. Let’s say that Sam is creating a CI/CD pipeline (Continuous Integration & Continuous Commitment) and wants to exam information technology get-go on a local automobile (laptop) earlier deploying it to the deject. Sam tin enable WSL (& WSL 2 to improve speed and performance), and so use a genuine Linux Ubuntu instance locally (on the laptop) with whatsoever Fustigate commands and tools they prefer. Once the development pipeline is verified locally, Sam can so push that CI/CD pipeline up to the deject (ie Azure) past making it into a Docker container and pushing the container to a cloud instance where it runs on a production-ready Ubuntu VM.

What is Bash?

Fustigate is a popular text-based beat and control-language. It is the default vanquish included within Ubuntu and other Linux distros, and in macOS. Users type commands into a beat to execute scripts and/or run commands and tools to accomplish many tasks.

How does this work?

Check out this article on the Windows Command Line weblog: A Deep Swoop Into How WSL Allows Windows to Access Linux Files which goes into detail about the underlying applied science.

Why would I use WSL rather than Linux in a VM?

WSL requires fewer resources (CPU, memory, and storage) than a total virtual machine. WSL as well allows you to run Linux command-line tools and apps alongside your Windows control-line, desktop and store apps, and to admission 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.

Why would I employ, for example, Ruddy on Linux instead of on Windows?

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 frequently behaves differently from Linux.

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

Popular:   Chrome OS is getting a major update that professionals will love

These are but some of bug that caused many people to ask Microsoft to meliorate Windows’ command-line tools and what drove us to partner with Canonical to enable native Fustigate and Linux command-line tools to run on Windows.

What does this mean for PowerShell?

While working with OSS projects, there are numerous scenarios where it’south immensely useful to drib into Bash from a PowerShell prompt. Fustigate support is complementary and strengthens the value of the control-line on Windows, assuasive PowerShell and the PowerShell community to leverage other pop technologies.

Read more on the PowerShell team web log — Bash for Windows: Why it’s awesome and what it means for PowerShell

What processors does WSL support?

WSL supports x64 and Arm CPUs.

How do I access my C: bulldoze?

Mount points for hard drives on the local machine are automatically created and provide like shooting fish in a barrel access to the Windows file system.

/mnt/<drive letter>/

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

How do I set up Git Credential Managing director? (How practice I utilize my Windows Git permissions in WSL?)

Come across the tutorial Go started using Git on Windows Subsystem for Linux, which features a department on setting up Git Credential Director and storing authentication tokens in Windows Credential Manager.

How do I utilize a Windows file with a Linux app?

One of the benefits of WSL is being able to admission your files via both Windows and Linux apps or tools.

WSL mounts your machine’s stock-still drives under the
folder in your Linux distros. For example, your
bulldoze is mounted under

Using your mounted drives, you tin edit code in, for example,
using Visual Studio / or VS Code, and build/examination that code in Linux by accessing the same files via

Learn more than in Working across Windows and Linux file systems article.

Are files in the Linux drive different from the mounted Windows drive?

  1. Files under the Linux root (i.east.
    /) are controlled by WSL which aligns with Linux behavior, including but not express to:

    • Files which contain invalid Windows filename characters
    • Symlinks created for non-admin users
    • Changing file attributes through chmod and chown
    • File/folder example sensitivity
  2. Files in mounted drives are controlled by Windows and take the post-obit behaviors:

    • Support case sensitivity
    • All permissions are set to best reflect the Windows permissions

How do I uninstall a WSL Distribution?

To remove a distribution from WSL and
delete all of the data associated with that Linux distribution, run
wsl --unregister <distroName>
is the name of your Linux distro, which tin can be seen from the list in the
wsl -fifty

Additionally, yous can then uninstall the Linux distro app on your machine but like any other shop awarding.

To learn more about wsl commands, see the article, Bones commands for WSL.

How exercise I run an OpenSSH server?

OpenSSH ships with Windows as an optional characteristic. See the Install OpenSSH doc. Administrator privileges in Windows are required to run OpenSSH in WSL. To run an OpenSSH server, run your WSL distribution (ie Ubuntu) or Windows Terminal as an ambassador. There are several resources out in that location covering SSH scenarios with WSL. Check out Scott Hanselman’southward blog articles: How to SSH into a Windows ten Motorcar from Linux OR Windows OR anywhere, How to SSH into WSL2 on Windows 10 from an external car, THE Easy WAY how to SSH into Fustigate and WSL2 on Windows 10 from an external auto, and How to use Windows x’s built-in OpenSSH to automatically SSH into a remote Linux motorcar.

How do I modify the display language of WSL?

Why exercise I not have cyberspace access from WSL?

Some users have reported problems with specific firewall applications blocking internet access in WSL. The firewalls reported are:

  1. Kaspersky
  2. AVG
  3. Avast
  4. Symantec Endpoint Protection
  5. F-Secure

In some cases turning off the firewall allows for access. In some cases simply having the firewall installed looks to block access.

How do I access a port from WSL in Windows?

WSL shares the IP address of Windows, as it is running on Windows. As such you can access any ports on localhost east.g. if you had web content on port 1234 you could https://localhost:1234 into your Windows browser. For more information, come across Accessing network applications.

How can I dorsum upwards my WSL distributions, or move them from one drive to another?

The best way to backup or motility your distributions is via the export/import commands bachelor in Windows Version 1809 and later. You lot tin consign your entire distribution to a tarball using the
wsl --consign
command. You tin can and so import this distribution back into WSL using the
wsl --import
command, which can proper noun a new drive location for the import, allowing you to backup and save states of (or move) your WSL distributions.

Please notation that traditional backup services that fill-in files in your AppData folders (like Windows Backup) will non corrupt your Linux files.


Does WSL 2 employ Hyper-V? Will it be available on Windows x Home and Windows eleven Home?

WSL 2 is bachelor on all Desktop SKUs where WSL is available, including Windows 10 Dwelling house and Windows eleven Home.

The newest version of WSL uses Hyper-V compages to enable its virtualization. This architecture will be bachelor in the ‘Virtual Machine Platform’ optional component. This optional component will be available on all SKUs. You tin wait to run across more details about this experience shortly as we go closer to the WSL 2 release.

What will happen to WSL 1? Volition it be abased?

We currently have no plans to deprecate WSL ane. You can run WSL 1 and WSL 2 distros side by side, and tin can upgrade and downgrade any distro at any time. Adding WSL ii equally a new architecture presents a better platform for the WSL team to deliver features that make WSL an amazing way to run a Linux environment in Windows.

Will I be able to run WSL 2 and other tertiary party virtualization tools such as VMware, or VirtualBox?

Some 3rd political party applications cannot work when Hyper-V is in employ, which means they volition not be able to run when WSL ii is enabled, such every bit VMware and VirtualBox. However, recently both VirtualBox and VMware have released versions that support Hyper-V and WSL2. Larn more virtually VirtualBox’s changes hither and VMware’s changes here. For troubleshooting bug, take a look at the VirtualBox outcome discussions in the WSL repo on GitHub.

We are consistently working on solutions to support third-party integration of Hyper-Five. For example, we betrayal a ready of APIs called Hypervisor Platform that third-party virtualization providers can apply to brand their software compatible with Hyper-V. This lets applications apply the Hyper-Five compages for their emulation such equally the Google Android Emulator, and VirtualBox half dozen and in a higher place which are both now uniform with Hyper-V.

See the WSL issues repo for more background and word on WSL 2 bug with VirtualBox 6.1.

*If you lot’re looking for a Windows virtual machine, VMWare, Hyper-V, VirtualBox, and Parallels VM downloads are bachelor on the Windows Dev Eye.

Can I access the GPU in WSL two? Are there plans to increase hardware support?

Nosotros have released support for accessing the GPU inside of WSL 2 distributions! This means y’all can at present use WSL for machine learning, bogus intelligence, and data science scenarios more easily when big data sets are involved. Check out the get started with GPU support tutorial. Every bit of right now WSL ii does not include series support, or USB device support. Nosotros are investigating the best way to add these features. However, USB back up is now available through the USBIPD-WIN projection. See Connect USB devices for steps to set upward USB device support.

Popular:   Samsung Galaxy Z Fold 4 case leak highlights one potential design change

Tin can WSL 2 use networking applications?

Yes, in full general networking applications will piece of work better and be faster with WSL 2 since information technology offers full organisation call compatibility. However, the WSL 2 compages uses virtualized networking components, which means that WSL 2 volition acquit similarly to a virtual motorcar — WSL 2 distributions will have a dissimilar IP accost than the host machine (Windows Bone). For more information, see Accessing network applications with WSL.

Can I run WSL 2 in a virtual car?

Yeah! You demand to make certain that the virtual automobile has nested virtualization enabled. This can be enabled in your parent Hyper-V host by running the following command in a PowerShell window with Administrator privileges:

Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true

Make sure to replace ‘<VMName>’ with the name of your virtual car.

Tin I employ wsl.conf in WSL 2?

WSL 2 supports the aforementioned wsl.conf file that WSL 1 uses. This means that any configuration options that you had set in a WSL 1 distro, such as automounting Windows drives, enabling or disabling interop, irresolute the directory where Windows drives will exist mounted, etc. will all piece of work inside of WSL two. You tin larn more than about the configuration options in WSL in the Distribution Management page. Acquire more than near support for mounting drives, disks, devices, or virtual hard disks (VHDs) in the Mount a Linux disk in WSL 2 article.

Where can I provide feedback?

The WSL production repo issues enables you to:

  • Search existing problems
    to meet if there are any associated with a problem that you are having. Note that in the search bar, you tin remove “is:open up” to include bug that have already been resolved in your search. Delight consider commenting or giving a thumbs up to any open up bug that you would like to limited your interest in moving forrad every bit a priority.
  • File a new effect. If you take constitute a problem with WSL and there does non appear to be an existing issue, y’all tin can select the green
    New issue
    button and and then cull
    WSL – Issues Report. You lot volition need to include a title for the issue, your Windows build number (run
    cmd.exe /c ver
    to encounter your current build #), whether you’re running WSL 1 or two, your current Linux Kernel version # (run
    wsl.exe --status
    cat /proc/version), the version # of your distribution (run
    lsb_release -r), any other software versions involved, the repro steps, expected behavior, actual behavior, and diagnostic logs if bachelor and appropriate. For more info, see contributing to WSL.
  • File a characteristic request
    by selecting the greenish
    New issue
    button and then select
    Feature request. You will demand to address a few questions describing your asking.

Yous tin also:

  • File a documentation issue
    using the WSL docs repo. To contribute to the WSL docs, see the Microsoft Docs contributor guide.
  • File a Windows Last
    outcome using the the Windows Final product repo if your problem is related more to the Windows Final, Windows Panel, or the command-line UI.

If you’d like to stay up to engagement with the latest WSL news you can do so with:

  • Our command-line squad weblog
  • Twitter. Please follow @craigaloewen on Twitter to larn of news, updates, etc.