To use Visual Studio Code with the Windows Subsystem for Linux,please install Visual Studio Code in Windows and uninstall the Linux version in WSL. Then I uninstalled and reinstalled the deb of vscode, but it didn't seem to make any sense.Finally, keep repeating the following:
At first I configured the PATH in " /.zshrc" and was able to use vscode, but later I suddenly found the "/.vscode" file was cleared. You can find their posts on the subject here and here respectively.When I was using WSL with VS Code, I was initially able to use the "code." command in WSL to interact with VS Code, but shell tell me "zsh: permission denied: code".Yes, I am using ZSH, but this does not seem to be related to the common "PATH" problem. I’d also like to give a quick shout out to DevPro Media and Bobby Johnson for their tutorials as they were the ones that helped me figure this out. Let me know if it doesn’t work for you and how I might change it to make it better. Thanks for reading! This was a super quick post about getting Powerline setup in WSL and VS Code. Simply replace any font listed there with the Powerline font of your choice:Īnd that’s it! Now you should have Powerline working in both the default WSL shell (or Windows Terminal) and also have it working in the integrated VS Code terminal. Then search for “Terminal Integrated Font Family”. To make it work, simply open VS Code, open up Settings (File -> Preferences -> Settings or Ctrl+,). This change is super simple because all that’s broken with the VS Code terminal is that it’s not using a Powerline font, but instead defaults to a different monospaced font. Now if you use VS Code like I do, you’ll want your integrated WSL terminal within VS Code to also have the Powerline goodness. Since I’m new to Powerline I don’t have much input on all these options but poke around the web and you’ll find plenty of things to tinker with. You can tweak Powerline to your hearts content with different colors, symbols, and such. If it works, your terminal should now look like this: It should look like the below:Īnd you’re done! You should be able to close the WSL terminal window, re-open it, and you’ll have Powerline up and running.
Once there, you’ll want to set the font to anything that says Powerline in the name. To do this, simply open up your WSL terminal, right click on the top of the window, and select properties, then select the Font tab. Once the fonts have installed (it’ll take a bit because it pops up a window for each one), you can now set one of the Powerline fonts as the shell font in your terminal. Then you can clone the repository, install the fonts, and then remove the repository all in one set of commands:
Navigate to some directory where you’re good cloning the repo to.
Wsl visual studio code install how to#
Since this is WSL though, we need to install the fonts through Windows so that our terminal windows know how to find and display them. The Powerline fonts are easily available from the powerline GitHub user so we can simply clone the repository and then install. Source $HOME/.local/lib/python2.7/site-packages/powerline/bindings/bash/powerline.shīefore you source this file we need to set up the Powerline fonts so that it will work with WSL (note that this is not the way you’d normally get the Powerline fonts working on a standard Linux installation). # Add this to your PATH if it’s not already declared