How to edit code in your Windows Linux Subsystem with VS Code
If you have a windows system or laptop but somehow prefer working in a Linux development environment because of the simplicity it offers.
Visit the windows store (available in windows 8 or 10) and install your preferred Linux distribution. I will be installing Ubuntu here.
Select any version of your choice and install
Launch the Ubuntu app when it’s done installing and type the command and type the following into the text editor and save.
sudo nano /etc/wsl.conf
[automount]
enabled=true
root = /
options="metadata,uid=1000,gid=1000,umask=002,dmask=002,fmask=002"
Install or launch your VS Code application and install the Remote WSL extension to help you access files in your Linux environment from windows.
Once the extension is done installing. You can now switch your development environment to Linux from within VScode by clicking the green button at the bottom left of the IDE.
Select “Remote-WSL — New window” and continue with your development in the newly opened window.
I hope this helps.
Good luck!!!