Visual Studio Code Remote - WSL
The Remote - WSL extension extension lets you use the Windows Subsystem for Linux (WSL) as your full-time development environment right from VS Code. This new, optimized support lets you:
- Use Windows to develop in a Linux based environment, using Linux specific toolchains and utilities.
- Edit files located in WSL or the mounted Windows filesystem (e.g.
- Run and debug your Linux based applications on Windows, in VS Code.
Remote - WSL runs commands and extensions directly in WSL so you don't have to worry about pathing issues, binary compatibility, or other cross-OS challenges. You're able to use VS Code in WSL just as you would from Windows.
Install VS Code or VS Code Insiders and this extension.
Note: When prompted to Select Additional Tasks during installation, be sure to check the Add to PATH option so you can easily open a folder in WSL using the
Install the Windows Subsystem for Linux along with your preferred Linux distribution.
Note: WSL2 support is experimental. Also, extensions installed in Alpine Linux may not work due to
glibc dependencies in native code inside the extension. See the Remote Development and Linux article for details.
Working with Git? Here are two tips to consider:
- If you are working with the same repository in WSL and Windows, be sure to set up consistent line endings. See tips and tricks to learn how.
- You can also avoid passwords by configuring WSL to use the Windows Git credential manager. See tips and tricks to for details.
Follow the step-by-step tutorial or if you already have WSL running:
- Follow the installation steps above.
- Open a WSL terminal for your installed distribution (e.g. Ubuntu 18.04 LTS)
- Go to any folder and type:
Or you can:
- Start VS Code.
F1, enter Remote-WSL: New Window, and hit enter.
- Use the File menu to open your folder.
VS Code will set up the environment and a new VS Code window will appear with the contents of the WSL folder!
Another way to learn what you can do with the extension is to browse the commands it provides. Press
F1 to bring up the Command Palette and type in
Remote-WSL for a full list.
You can also click on the Remote "Quick Access" status bar item in the lower left corner to get a list of the most common commands.
For more information, please see the extension documentation.
While an optional install, this extension releases with VS Code. VS Code release notes include a summary of changes to all three Remote Development extensions with a link to detailed release notes.
As with VS Code itself, the extensions update during a development iteration with changes that are only available in VS Code Insiders Edition.
Questions, Feedback, Contributing
Have a question or feedback?
Or connect with the community...
Visual Studio Code Remote - WSL and related extensions collect telemetry data to help us build a better experience working remotely from VS Code. We only collect data on which commands are executed. We do not collect any information about image names, paths, etc. The extension respects the
telemetry.enableTelemetry setting which you can learn more about in the Visual Studio Code FAQ.
By downloading and using the Visual Studio Remote - WSL extension and its related components, you agree to the product license terms and privacy statement.