VSCode not starting in Ubuntu

Problem: Suddenly VSCode won’t open in Ubuntu WSL when you type code .

Error: ComputerName:~/.vscode-server-server/bin/5554b12acf27056905806867f251c859323ff7e9/bin$ code . /c/Users/userName/.vscode/extensions/ms-vscode-remote.remote-wsl-0.63.13/scripts/wslCode.sh: 69: /home/evidence/.vscode-server-server/bin/5554b12acf27056905806867f251c859323ff7e9/bin/code: not found

Solution: Not sure what solved the problem, but things I tried before it started working again.

go into /home/evidence/.vscode-server-server/bin/5554b12acf27056905806867f251c859323ff7e9/bin/ to make sure there is no folder there called “code”

run sudo apt remove code to remove any vscode installation.

Then, to remove the components of VScode, do

sudo apt autoremove

Restart computer either before or after running these 2 codes.

Open a new ubuntu window to try running code . again.

If the above process doesn’t work, then

sudo apt install code

sudo apt remove code

sudo apt autoremove

open a new ubuntu window

Try reopening code again using Ubuntu in the new window.

Another solution I tried

Remove .vscode folder from this directory /mnt/c/Users/Samsung$ (you have to match this directory to your local directory)

Close your WSL

Open VSCode from your desktop (You are not supposed to have VSCode installed in Linux when using WSL, The VScode installed on windows computer is what WSL uses). Close it or keep it open if you like.

Reopen WSL and try to run code . again to see if it works

If the above process doesn’t work.

Then open a folder in VSCode in your local computer. Install the extension Remote-WSL if you don’t have it already. Press ctrl + shift + p. Search for and click reopen folder in WSL.

After the folder reopens in WSL, go back to Ubuntu and try running code . again.

Any combination of the 3 strategies above may or may not work. At least, these are the things I did to resolve it.


  • thanks a lot buddy.. second option worked flawlessly for me 🙂 … keep up the good work !!!

  • Thank you! Last option worked for me as well.

    I think this problem occurs if you open VS Code in Ubuntu and it runs the automatic update there *before* you’ve updated the instance of VS Code on your “local” Windows system.

    Once I opened VS Code in my Windows system and then went back to Ubuntu and restarted code, I saw that it updated again, but this time it was able to start correctly after the update.


Leave a Comment

Scroll to Top