1

I'm following the guide and I am noticing that code tunnel -h in a ubuntu terminal window just launches the code UI. Using the command palette to get the URI results in a tunnel to my Windows version of VSCode rather than the WSL:ubuntu (which is the one I care about)

How do I fix this?

rioV8
  • 24,506
  • 3
  • 32
  • 49
SumNeuron
  • 4,850
  • 5
  • 39
  • 107
  • 1
    Weird that `code tunnel -h` launches the code UI. [The docs](https://code.visualstudio.com/blogs/2022/12/07/remote-even-better#_enhanced-code-cli) say: "_You may explore tunneling-specific commands with: `code tunnel -h`_" – starball Feb 06 '23 at 00:54
  • @user exactly (that is how I knew to run it)! I think that documentation is written for Windows directly, not WSL2? – SumNeuron Feb 06 '23 at 12:51

1 Answers1

1

It appears that, for now, you need to manually install the CLI in WSL in order for it to work. The downloads can be found here. Since you are on Windows, I would recommend the x64 CLI download. When you extract the tar.gz file, you will get a file named code. I would recommend moving it to your home directory for ease. To open the tunnel, run ./code tunnel (from wherever you put the code file) to force the new CLI. If you use code tunnel it will still use the Windows version.

Source: https://github.com/microsoft/vscode/issues/171196

Excelsior
  • 21
  • 2