It's no secret to any of the developers that Linux is the preferred programming environment. And one of the main reasons is its full-fledged terminal, which has a large set of console utilities and ways of interacting between them, with which you can do many useful things, in comparison with the same, for many beloved, Windows.
Hence the "question" follows ? - Is there such an opportunity to develop web applications based on Linux, but working on Windows, and even with the ability to configure its terminal / console in such a popular code editor (IDE) as Visual Studio Code.
Yes, you can.
Since relatively recently, Microsoft developers, in order not to lose their competitive advantage over Linux, have implemented into their Windows 10 (x64) operating system the Linux kernel image WSL2 (version 4.19), which is a lightweight virtual machine that does not need to be installed to run a full-fledged the role of Hyper-V (virtualization technology based on a low-level shell). Linux system calls are translated on the fly into Windows calls without using an emulator (unlike WSL1).
A simple step-by-step algorithm for how to install the Linux subsystem on Windows 10 and configure its console to work through the VSCode terminal:
Enabling WSL in Windows 10 (x64)
Next, you need to install WSL2 (a new version of the Windows subsystem architecture for Linux that supports the Windows subsystem for Linux to run Linux ELF64 binaries on Windows).
After installation, reboot the system.
Next, you need to open Powershell as an administrator (PS>Start-Process powershell-Verb runAs) and run the following command to set WSL2 by default:
wsl --set-default-version 2
Installing the Ubuntu distribution on Windows
Let's install the latest version of Ubuntu (currently 22.04.2 TSL)
Ubuntu is GNU/Linux distribution based on Debian GNU/Linux.
Go to the Microsoft Store and enter Ubuntu in the search bar (it's free).
Next, we get it (get) and run it (open).
The installation window will appear (you need to wait).
After installation, you will need to register: enter your name (any name) and password (the password is entered without displaying the typed line, keep in mind, and it must be remembered for subsequent work in the console).
We are not closing this console.
Linking the Linux console to the VS CODE terminal
Before this procedure, the WSL extension must be installed in VS CODE.
Next, enter the command into the Ubuntu 22.04.2 console:
code .
and press Enter.
The Linux console will be integrated into the VS CODE working interface, where you can already use its native terminal to access the Linux system via the command line.
Now you can install all the necessary packages on Linux and fully work with it, thereby preserving the functionality of Windows for your other tasks.