If you’re like me, you’ve been using the Linux Subsystem in Windows for a while now. The amazement that I can run Ubuntu Linux from within Windows itself is still not lost on me.
Recently whilst I went on a configuration rampage in VSCode, really fine-tuning my settings to create the best development environment possible (I’ll share those settings in a separate post), and I discovered the integrated terminal supports not only Command Prompt and PowerShell, but also the Windows System for Linux (WSL) terminal.
All you have to do is add the following to your user settings JSON file:
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\bash.exe"
Now when you trigger the integrated terminal using ctrl + shift + tilde
it will use the WSL terminal, giving you a true proper Unix command line to work from.
Thanks for that Dwayne, it helped a lot. I also found this VS Code extension that allows you to specify multiple integrated terminals for Windows (and other OS).
https://marketplace.visualstudio.com/items?itemName=Tyriar.shell-launcher
1. ctrl + shift + p
2. type ‘shell’ into the search box
3. select ‘Select Default Shell’ from the dropdown
4. select ‘WSL’ from the options presented