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?

2
  • 1
    Weird that code tunnel -h launches the code UI. The docs say: "You may explore tunneling-specific commands with: code tunnel -h" Commented Feb 6, 2023 at 0:54
  • @user exactly (that is how I knew to run it)! I think that documentation is written for Windows directly, not WSL2? Commented Feb 6, 2023 at 12:51

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.