Going from Linux to Windows is not easy. When it came to work, nothing could beat the power of the command line and my legendary homemade vim config.
I recently bought a Dell XPS 15. Really nice computer. However it seems that Dell has implemented some nice features, which to my knowledge only works on a Windows distribution. Sucks when I spent so much time mastering the vim+zsf.
The Linux subsystem for Windows brought light to my weary bones though, and I will teach you how you can harness the true power of Windows (Which is a Linux VM).
To harness the power of the Linux gods you will have to finish these three tasks;
- Activate The Linux subsystem for Windows.
- Install a Linux distro from the Windows store (I use ubuntu).
- Install the WSL extension for VS Code.
Activate the Linux subsystem
This is done by searching for "Turn Windows features on or off" and checking the Linux subsystem option.
Install the Linux
Simple; get it, run it, love it.
Notes on the Linux distro
This will come with git preinstalled, but I have compiled a set of nice-to-have features which you can copy paste to your WSL terminal to get to the godlike level of Linux terminal control.
- Oh my ZSH link
- Node version manager link
NOTE: if you installed oh my zsh first, it will add the NVM to the path.
- Yarn package manager link
We will use the --no-install-recommends since we use NVM as our node host. Otherwise delete the flag.
Node and NPM link
Wan't to see the code-snippet? Read the blogpost on Dev.to here.
The Visual Studio code part
Now this is where the magic happens, in VS Code install the plugin WSL
Now simple ctrl-shift-p and search WSL and click open VS Code in WSL.
VS Code will then start a server in WSL but let you use the VS Code you have installed on windows.
If you open a terminal in the new VS Code window it will open in the Linux bash, and you are now free to keep bash or install zsh and be a Linux god on Windows.
This should cover all the basic of getting to use WSL in Windows.
If you like WSL in Windows with VS code, leave a comment below or show some love!