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. /mnt/c).
- 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.
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 code or code-insiders command.
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: code .
Or you can:
- Start VS Code.
- Press 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.
Questions, Feedback, Contributing
Have a question or feedback?
- See the documentation or the troubleshooting guide.
- Up-vote a feature or request a new one, search existing issues, or report a problem.
- Contribute to our documentation
- …and more. See our CONTRIBUTING guide for details.
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.