hobgadling
hobgadling

Reputation: 141

Editing WSL config files\code etc with Visual Studio Code, in Windows

I am really enjoying WSL and using it for a lot of stuff these days, including my Ansible workstation, also writing a lot more code in it...

Question: I can see where the WSL file system is:

https://askubuntu.com/questions/759880/where-is-the-ubuntu-file-system-root-directory-in-windows-nt-subsystem-and-vice

All of the docs tell you very clearly to stay away from the Linux file system and not to access it from the Windows instance it is running under. Fine. But! I hate to ask redundant question, but I would dearly, dearly love to be able to use full blown graphical VS Code in Windows in my text editor for WSL. Am i missing a trick somewhere for a way to do this without breaking anything?

Apologies for the non question. Hopefully it is allowed.

Upvotes: 4

Views: 2822

Answers (1)

Isometriq
Isometriq

Reputation: 381

In vscode...

  1. You can press the green icon bottom-left
  2. This will open the command palette
  3. Choose "New WSL Window"
  4. Open a folder, you will be able to navigate from ~ to choose location in command palette
  5. Once folder is choosen, you're set to go, vscode will display file tree from opened folder and you can do your thing :)

Upvotes: 1

Related Questions