简体   繁体   中英

How to open a VS Code IDE from Linux subsystem on Windows?

I'm running a Linux subsystem with an Ubuntu terminal inside Windows 10 - I wanted to make use of the functionalities of both operating systems without partitions or virtual machines.

In an Ubuntu terminal on Linux, I use the command 'code .' to open up the VS Code IDE but it doesn't seem to work when the terminal is part of a subsystem on Windows.

I can open up the IDE from Windows 10 and set my path into the Linux system but I remember reading some guidance that it's okay to save files from the Linux onto the Windows side but not vice versa.

Any solutions are much appreciated, thanks in advance!

If you wish to invoke windows binaries from WSL (Windows Subsystem for Linux) like for the example you want to run visual-studio-code, you can do so by setting your visual-code's installation directory into your %PATH% system variable and invoking it using this way

$ [application-name].exe notice the .exe is important.

And this interoperability is added in the Fall Creator Update of windows.

You can follow this documentation from Microsoft for more help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM