Linux development on Windows with WSL and Visual Studio Code Remote

Original author: Craig Loewen
  • Transfer
Working with VS Code Remote and Windows Subsystem for Linux (WSL) makes it possible to use a fully functional Linux development environment on a laptop or desktop with Windows preinstalled. In this article, we’ll look at how to use these tools to develop Python applications on Linux.


First thing: installing the necessary components

To complete all the steps described in this article, you will need WSL and VS Code with the installed VS Code Remote extension - WSL. Let's quickly look at what it is and how to install it.

Windows Subsystem for Linux

The Windows Subsystem for Linux tool, abbreviated WSL, lets you run unmodified Linux binaries directly on Windows. This means that you can use your favorite Linux tools, command line applications, and workflows on your Windows computer without the need for complex settings such as Dual Boot. And best of all, WSL is a tightly integrated solution between Windows and Linux. In other words, if you love Linux, then you can access all Windows files and executables directly from the bash shell, and if you love Windows, you can easily access Linux binaries and files from PowerShell or CMD.

If you are new to WSL and want to learn more, you can take our full course:Start working with the Windows subsystem for Linux , or read only the installation instructions in the WSL documentation .

Visual studio code

Visual Studio Code is a lightweight but powerful code editor that runs on the desktop and is available on Windows, macOS, and Linux. It comes with built-in support for JavaScript, TypeScript and Node.js, and also has a rich ecosystem of extensions for other languages ​​(such as C ++, C #, Java, Python, PHP, Go) and runtimes (such as .NET and Unity). Download and start your journey with VS Code .

You will also need the VS Code Remote - WSL extension, which allows you to use a container, a remote computer, or Windows Subsystem for Linux (WSL) as a fully functional development environment. To learn more and get started, visit the VS Code Remote documentation page .

To the start, attention, Linux!

Instead of writing a long section on getting started with VS Code Remote in WSL, we decided to shoot this short video demonstrating Python development in WSL using VS Code Remote.

This is not just Python isolated, you can use VSCode Remote and WSL in any Linux project

When using VS Code Remote in WSL, commands and extensions run directly on the Linux distribution, so you don’t have to worry about binary compatibility issues or other cross-OS issues. You can use VS Code in WSL in the same way as in Windows.

VS Code Remote and WSL change the rules of the game when it comes to Linux development on Windows. These tools let you develop, run, and debug tons of Linux applications directly on your Windows computer, giving you the best of both Windows and Linux.

If you want to know more about Windows Subsystem for Linux and all about the Windows command line, then stay tuned for updates on this blog! And if you're interested in learning more about VS Code Remote, you can read the blog article hereand extensive documentation covering architecture here .

We are pleased to present you a powerful combination of VS Code Remote and WSL!

Good coding!

Also popular now: