VSCode doesn't open in the right directory in WSLgit can't add files, sees changesBitvise SSH Server putting...

Can the "Friends" spell be used without making the target hostile?

A starship is travelling at 0.9c and collides with a small rock. Will it leave a clean hole through, or will more happen?

Can we "borrow" our answers to populate our own websites?

The probability of reaching the absorbing states from a particular transient state?

How would an AI self awareness kill switch work?

Why do we have to make "peinlich" start with a capital letter and also end with -s in this sentence?

Why does 0.-5 evaluate to -5?

How can I play a serial killer in a party of good PCs?

Sprint is 2 week and 40-stories

Nuance between philia and mania?

How to politely refuse in-office gym instructor for steroids and protein

When obtaining gender reassignment/plastic surgery overseas, is an emergency travel document required to return home?

How much mayhem could I cause as a fish?

Best way to strengthen a wheel?

Can you tell from a blurry photo if focus was too close or too far?

How do you voice extended chords?

A Missing Symbol for This Logo

Book where a space ship journeys to the center of the galaxy to find all the stars had gone supernova

Why do neural networks need so many training examples to perform?

Is there a lava-breathing lizard creature (that could be worshipped by a cult) in 5e?

How do I prevent a homebrew Grappling Hook feature from trivializing Tomb of Annihilation?

Calculate the true diameter of stars from photographic plate

What senses are available to a corpse subjected to a Speak with Dead spell?

"Starve to death" Vs. "Starve to the point of death"



VSCode doesn't open in the right directory in WSL


git can't add files, sees changesBitvise SSH Server putting extra spaces in sessionHow to get the host user home directory in WSL BashWSL Bash doesn't startWhy doesn't the WSL Ubuntu console have scrollbars?Windows Git won't work correctly with ConEMU after updating bothWSL-bash-launched Windows apps exclusively lock filesHow to open windows explorer from current working directory of WSL shell?Why doesn't vim mouse in WSL work in any terminal emulator other than Windows console?The terminal process command 'C:WindowsSystem32cmd.exe' failed to launch (exit code: 2)













0















I am using WSL, specifically the WLinux Distro. I have installed everything. NodeJS, Git, zsh, oh-my-zsh, even solved my problem with the SSH Keys somehow.



But, now when I move to the desired directory in WSL and execute Code ., VSCode opens, but in the entirely wrong place. I see my System32 files open in VSCode, and I cannot navigate with the integrated terminal. I have these settings.



{
"terminal.external.windowsExec": "C:\Windows\System32\wsl.exe",
"terminal.integrated.shell.windows": "C:\Windows\System32\wsl.exe"
}


With the above settings, I can see zsh, activated in the Integrated terminal, but open in system32. I need this opened in my working file.



The Question:
Please, can you tell me how to make, 1) VSCode to open by typing Code ., in WSL terminal, and how to set the integrated terminal to be the same as WSL. Also, if you could explain to me why it would be great. I am losing this WSL System at some point. Thanks



In WSL Terminal if I do regular code . without Capital it spits out this.



projectName git:(master) code .                                                                               zsh: no such file or directory: /mnt/c/Program Files/Microsoft VS Code/Code.exe ```

Git seems to work in WSL Terminal since I can do `glog`.









share|improve this question

























  • I even tried something as simple as that, "terminal.integrated.shell.windows": "wsl.exe", and still doesn't work. It still open up in System32.. I have read various answers, but nothing works. And the more engineered ones, I don't understand.

    – Dimitris Efst
    Jan 24 at 20:15











  • Also, both VSCode and the files I am trying to open are on WSL. I also installed VSCode on Windows, but it didn't solve anything.

    – Dimitris Efst
    Jan 24 at 20:17











  • Also, another thing. If I do Code filename, inside my project it justs opens it as blank. And the terminal is unusable until I close VSCode.

    – Dimitris Efst
    Jan 24 at 20:23
















0















I am using WSL, specifically the WLinux Distro. I have installed everything. NodeJS, Git, zsh, oh-my-zsh, even solved my problem with the SSH Keys somehow.



But, now when I move to the desired directory in WSL and execute Code ., VSCode opens, but in the entirely wrong place. I see my System32 files open in VSCode, and I cannot navigate with the integrated terminal. I have these settings.



{
"terminal.external.windowsExec": "C:\Windows\System32\wsl.exe",
"terminal.integrated.shell.windows": "C:\Windows\System32\wsl.exe"
}


With the above settings, I can see zsh, activated in the Integrated terminal, but open in system32. I need this opened in my working file.



The Question:
Please, can you tell me how to make, 1) VSCode to open by typing Code ., in WSL terminal, and how to set the integrated terminal to be the same as WSL. Also, if you could explain to me why it would be great. I am losing this WSL System at some point. Thanks



In WSL Terminal if I do regular code . without Capital it spits out this.



projectName git:(master) code .                                                                               zsh: no such file or directory: /mnt/c/Program Files/Microsoft VS Code/Code.exe ```

Git seems to work in WSL Terminal since I can do `glog`.









share|improve this question

























  • I even tried something as simple as that, "terminal.integrated.shell.windows": "wsl.exe", and still doesn't work. It still open up in System32.. I have read various answers, but nothing works. And the more engineered ones, I don't understand.

    – Dimitris Efst
    Jan 24 at 20:15











  • Also, both VSCode and the files I am trying to open are on WSL. I also installed VSCode on Windows, but it didn't solve anything.

    – Dimitris Efst
    Jan 24 at 20:17











  • Also, another thing. If I do Code filename, inside my project it justs opens it as blank. And the terminal is unusable until I close VSCode.

    – Dimitris Efst
    Jan 24 at 20:23














0












0








0








I am using WSL, specifically the WLinux Distro. I have installed everything. NodeJS, Git, zsh, oh-my-zsh, even solved my problem with the SSH Keys somehow.



But, now when I move to the desired directory in WSL and execute Code ., VSCode opens, but in the entirely wrong place. I see my System32 files open in VSCode, and I cannot navigate with the integrated terminal. I have these settings.



{
"terminal.external.windowsExec": "C:\Windows\System32\wsl.exe",
"terminal.integrated.shell.windows": "C:\Windows\System32\wsl.exe"
}


With the above settings, I can see zsh, activated in the Integrated terminal, but open in system32. I need this opened in my working file.



The Question:
Please, can you tell me how to make, 1) VSCode to open by typing Code ., in WSL terminal, and how to set the integrated terminal to be the same as WSL. Also, if you could explain to me why it would be great. I am losing this WSL System at some point. Thanks



In WSL Terminal if I do regular code . without Capital it spits out this.



projectName git:(master) code .                                                                               zsh: no such file or directory: /mnt/c/Program Files/Microsoft VS Code/Code.exe ```

Git seems to work in WSL Terminal since I can do `glog`.









share|improve this question
















I am using WSL, specifically the WLinux Distro. I have installed everything. NodeJS, Git, zsh, oh-my-zsh, even solved my problem with the SSH Keys somehow.



But, now when I move to the desired directory in WSL and execute Code ., VSCode opens, but in the entirely wrong place. I see my System32 files open in VSCode, and I cannot navigate with the integrated terminal. I have these settings.



{
"terminal.external.windowsExec": "C:\Windows\System32\wsl.exe",
"terminal.integrated.shell.windows": "C:\Windows\System32\wsl.exe"
}


With the above settings, I can see zsh, activated in the Integrated terminal, but open in system32. I need this opened in my working file.



The Question:
Please, can you tell me how to make, 1) VSCode to open by typing Code ., in WSL terminal, and how to set the integrated terminal to be the same as WSL. Also, if you could explain to me why it would be great. I am losing this WSL System at some point. Thanks



In WSL Terminal if I do regular code . without Capital it spits out this.



projectName git:(master) code .                                                                               zsh: no such file or directory: /mnt/c/Program Files/Microsoft VS Code/Code.exe ```

Git seems to work in WSL Terminal since I can do `glog`.






linux terminal git zsh windows-subsystem-for-linux






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 24 at 20:24







Dimitris Efst

















asked Jan 24 at 20:07









Dimitris EfstDimitris Efst

23




23













  • I even tried something as simple as that, "terminal.integrated.shell.windows": "wsl.exe", and still doesn't work. It still open up in System32.. I have read various answers, but nothing works. And the more engineered ones, I don't understand.

    – Dimitris Efst
    Jan 24 at 20:15











  • Also, both VSCode and the files I am trying to open are on WSL. I also installed VSCode on Windows, but it didn't solve anything.

    – Dimitris Efst
    Jan 24 at 20:17











  • Also, another thing. If I do Code filename, inside my project it justs opens it as blank. And the terminal is unusable until I close VSCode.

    – Dimitris Efst
    Jan 24 at 20:23



















  • I even tried something as simple as that, "terminal.integrated.shell.windows": "wsl.exe", and still doesn't work. It still open up in System32.. I have read various answers, but nothing works. And the more engineered ones, I don't understand.

    – Dimitris Efst
    Jan 24 at 20:15











  • Also, both VSCode and the files I am trying to open are on WSL. I also installed VSCode on Windows, but it didn't solve anything.

    – Dimitris Efst
    Jan 24 at 20:17











  • Also, another thing. If I do Code filename, inside my project it justs opens it as blank. And the terminal is unusable until I close VSCode.

    – Dimitris Efst
    Jan 24 at 20:23

















I even tried something as simple as that, "terminal.integrated.shell.windows": "wsl.exe", and still doesn't work. It still open up in System32.. I have read various answers, but nothing works. And the more engineered ones, I don't understand.

– Dimitris Efst
Jan 24 at 20:15





I even tried something as simple as that, "terminal.integrated.shell.windows": "wsl.exe", and still doesn't work. It still open up in System32.. I have read various answers, but nothing works. And the more engineered ones, I don't understand.

– Dimitris Efst
Jan 24 at 20:15













Also, both VSCode and the files I am trying to open are on WSL. I also installed VSCode on Windows, but it didn't solve anything.

– Dimitris Efst
Jan 24 at 20:17





Also, both VSCode and the files I am trying to open are on WSL. I also installed VSCode on Windows, but it didn't solve anything.

– Dimitris Efst
Jan 24 at 20:17













Also, another thing. If I do Code filename, inside my project it justs opens it as blank. And the terminal is unusable until I close VSCode.

– Dimitris Efst
Jan 24 at 20:23





Also, another thing. If I do Code filename, inside my project it justs opens it as blank. And the terminal is unusable until I close VSCode.

– Dimitris Efst
Jan 24 at 20:23










2 Answers
2






active

oldest

votes


















0














I'm using the debian shell from the windows store and this config works for me:



"terminal.integrated.shell.windows": "C:\Users\USERNAME\AppData\Local\Microsoft\WindowsApps\debian.exe",
"terminal.integrated.shellArgs.windows": ["run"]





share|improve this answer































    0














    For Zsh and working, do not call wsl.exe but the distrib. I use Ubuntu 1804 and my settings are :



    "terminal.integrated.shell.windows": "ubuntu1804.exe",
    "terminal.integrated.shellArgs.windows": ["run"],


    The shell is in the windows path, so write the fullpath is useless.





    share








    New contributor




    blade is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.




















      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "3"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1398061%2fvscode-doesnt-open-in-the-right-directory-in-wsl%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      I'm using the debian shell from the windows store and this config works for me:



      "terminal.integrated.shell.windows": "C:\Users\USERNAME\AppData\Local\Microsoft\WindowsApps\debian.exe",
      "terminal.integrated.shellArgs.windows": ["run"]





      share|improve this answer




























        0














        I'm using the debian shell from the windows store and this config works for me:



        "terminal.integrated.shell.windows": "C:\Users\USERNAME\AppData\Local\Microsoft\WindowsApps\debian.exe",
        "terminal.integrated.shellArgs.windows": ["run"]





        share|improve this answer


























          0












          0








          0







          I'm using the debian shell from the windows store and this config works for me:



          "terminal.integrated.shell.windows": "C:\Users\USERNAME\AppData\Local\Microsoft\WindowsApps\debian.exe",
          "terminal.integrated.shellArgs.windows": ["run"]





          share|improve this answer













          I'm using the debian shell from the windows store and this config works for me:



          "terminal.integrated.shell.windows": "C:\Users\USERNAME\AppData\Local\Microsoft\WindowsApps\debian.exe",
          "terminal.integrated.shellArgs.windows": ["run"]






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 11 at 13:04









          RazzeRazze

          1012




          1012

























              0














              For Zsh and working, do not call wsl.exe but the distrib. I use Ubuntu 1804 and my settings are :



              "terminal.integrated.shell.windows": "ubuntu1804.exe",
              "terminal.integrated.shellArgs.windows": ["run"],


              The shell is in the windows path, so write the fullpath is useless.





              share








              New contributor




              blade is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.

























                0














                For Zsh and working, do not call wsl.exe but the distrib. I use Ubuntu 1804 and my settings are :



                "terminal.integrated.shell.windows": "ubuntu1804.exe",
                "terminal.integrated.shellArgs.windows": ["run"],


                The shell is in the windows path, so write the fullpath is useless.





                share








                New contributor




                blade is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.























                  0












                  0








                  0







                  For Zsh and working, do not call wsl.exe but the distrib. I use Ubuntu 1804 and my settings are :



                  "terminal.integrated.shell.windows": "ubuntu1804.exe",
                  "terminal.integrated.shellArgs.windows": ["run"],


                  The shell is in the windows path, so write the fullpath is useless.





                  share








                  New contributor




                  blade is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.










                  For Zsh and working, do not call wsl.exe but the distrib. I use Ubuntu 1804 and my settings are :



                  "terminal.integrated.shell.windows": "ubuntu1804.exe",
                  "terminal.integrated.shellArgs.windows": ["run"],


                  The shell is in the windows path, so write the fullpath is useless.






                  share








                  New contributor




                  blade is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.








                  share


                  share






                  New contributor




                  blade is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered 3 mins ago









                  bladeblade

                  1




                  1




                  New contributor




                  blade is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  blade is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  blade is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Super User!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1398061%2fvscode-doesnt-open-in-the-right-directory-in-wsl%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...

                      Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

                      VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...