Here’s how you can set the Windows Subsystem for Linux to be the default terminal inside VS Code. This allows for a very simple way to launch a bash prompt:
Ctrl + `
The first thing to do is install the Windows Subsystem for LInux, and then your distro of choice from the Windows Store. There are tons of guides for this, so I’m not going into the details - just search “How to install Windows Subsystem for Linux” and pick a guide that works for you.
Now that you have Linux installed and running, edit VS Code’s preferences. Use the keyboard shortcut:
or click on File > Preferences > Setting
Use this line to set the default terminal
Once this is done, save and restart VS Code. Now just use the Ctrl+` shortcut and VS Code will launch an intergated bash prompt with the current working directory set to the folder you have open.
If you want to change the CWD, use this line
I set mine to the root folder in bash. Your username and the package name will be different, of course. You can set the path to anything you like.
This lets me write my blog posts, and then update my site from inside VS Code. Makes things nice and easy.