Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Windows Subsystem for Linux as integrated terminal #22317

Closed
NCC1701M opened this issue Mar 9, 2017 · 6 comments
Closed

Use Windows Subsystem for Linux as integrated terminal #22317

NCC1701M opened this issue Mar 9, 2017 · 6 comments
Assignees
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code) terminal Integrated terminal issues

Comments

@NCC1701M
Copy link

NCC1701M commented Mar 9, 2017

  • VSCode Version: 1.10.2
  • OS Version: Win10 1607

Steps to Reproduce:

  1. Set the following settings in VSCode
    "terminal.integrated.shell.windows": "C:\\Windows\\System32\\bash.exe",
    "terminal.external.windowsExec": "C:\\Windows\\System32\\bash.exe"
  2. Try to start a new terminal

You get the following error message:
The terminal process command C:\Windows\System32\bash.exe failed to launch (exit code: 1)

@ramya-rao-a ramya-rao-a added the terminal Integrated terminal issues label Mar 9, 2017
@Tyriar
Copy link
Member

Tyriar commented Mar 9, 2017

Try this:

"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\bash.exe"

https://code.visualstudio.com/docs/editor/integrated-terminal#_configuration

@Tyriar Tyriar closed this as completed Mar 9, 2017
@Tyriar Tyriar added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Mar 9, 2017
@Drache93
Copy link

With the Fall Creators Update this is changed.
"C:\\Windows\\System32\\bash.exe" personally doesn't work - I'm assuming this isn't a left over from the old one.

The full application link is required :
"terminal.integrated.shell.windows": "C:\\Windows\\WinSxS\\amd64_microsoft-windows-lxss-bash_31bf3856ad364e35_10.0.16299.15_none_62878a822db68b25\\bash.exe"

Note:
I'm not sure if this folder will have a different name for other users (significance of the alphanumerics after "none"?), looks like it will change with each version...personally not well versed on Win10 apps so couldn't say either way.

@Tyriar
Copy link
Member

Tyriar commented Oct 28, 2017

@Drache93 I'm on the Fall Creators Update and this works fine for me:

"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\bash.exe"

@Drache93
Copy link

Drache93 commented Nov 5, 2017

Sorry didn't make this clear. I'm using the new Ubuntu distro from the Windows Store. Rather than the old Bash on Windows. Is this the same for you @Tyriar?

@Tyriar
Copy link
Member

Tyriar commented Nov 6, 2017

Not sure I've tried on a PC without Bash on Windows installed via the older mechanism, so not sure. If that is the new recommended path it's not particularly nice. @bitcrazed is it true that users will need to use a path like this when hooking up Ubuntu installed via the store?

"terminal.integrated.shell.windows": "C:\\Windows\\WinSxS\\amd64_microsoft-windows-lxss-bash_31bf3856ad364e35_10.0.16299.15_none_62878a822db68b25\\bash.exe"

@bitcrazed
Copy link

Thanks @Tyriar .

@Drache93 - When using new store-delivered distros, one can be configured as your default - this is the distro that gets launched when you call bash.exe or wsl.exe. You can configure which distro you want to set as your default using wslconfig.exe.

If you're calling from a 32-bit process, you'll need to reference via sysnative: C:\\Windows\\sysnative\\bash.exe as @Tyriar suggested above.

If you're configuring VSCode 64bit edition, you can directly reference C:\\WINDOWS\\System32\\bash.exe or C:\\WINDOWS\\System32\\wsl.exe

If you wanted to specifically instantiate a given distro, just call ubuntu.exe or openSUSE-42.exe or SLES-12 (no absolute paths needed - they'll already be on your OS path).

HTH.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code) terminal Integrated terminal issues
Projects
None yet
Development

No branches or pull requests

5 participants