Linux development in Windows with WSL and Visual Studio Code Remote
Working with VS Code Remote and Windows Subsystem for Linux (WSL) allows you to use a fully functional Linux development environment on a laptop or desktop with Windows preinstalled. This article will look at how to use these tools to develop Python applications on Linux.
First, install the necessary components
To perform all the actions described in this article, you will need WSL and VS Code with the VS Code Remote extension installed - 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, allows you to run unchanged 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 to use complex settings such as Dual Boot. 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 executable files directly from the bash shell, and if you love Windows, then you can easily access binary files and Linux files from PowerShell or CMD. ')
If you are new to WSL and want to learn more, you can take our full course: Getting Started with the Windows subsystem for Linux , or see only the installation instructions in the WSL documentation .
Visual studio code
Visual Studio Code is an easy 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, remote computer, or Windows Subsystem for Linux (WSL) as a full-featured development environment. To learn more and get started, visit the VS Code Remote documentation page .
At 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.
It's not just isolated Python, you can use VSCode Remote and WSL in any Linux project.
When using VS Code Remote, WSL commands and extensions run directly in the Linux distribution, so you do not need to worry about binary compatibility issues or other cross-OS related issues. You can use VS Code in WSL just like in Windows.
VS Code Remote and WSL change the rules of the game when it comes to developing for Linux on Windows. These tools allow you to develop, run and debug tons of Linux applications directly on your Windows computer, giving you the best of your Windows and Linux environment.
If you want to learn more about Windows Subsystem for Linux and everything about the Windows command line, then stay tuned to this blog! And if you're interested in learning more about VS Code Remote, you can read the blog post here and the extensive documentation covering the architecture here .
We are pleased to present you a powerful combination of VS Code Remote and WSL!