Problem running vscode from terminal

Solution 1:

I used to have the same problem, I just removed the created link with:

unlink /usr/local/bin/code/Code

Then re created the link directly under "/usr/local/bin" like below

sudo ln -s /path/to/vscode/Code /usr/local/bin

Works for me, let us know if it worked ...

Solution 2:

I installed code-insiders through ubuntu softwares. since it is a snap install so it was installed into /snap/bin/code-insiders . to check whether an application is installed. run

$ dpkg -l             

it gives complete list of applications which are installed in the system. look for code-insiders there. to check the installation directory of code-insiders, run

$ which code-insiders

In my case it was showing /snap/bin/code-insiders

then i linked it to /usr/bin by running the command.

$ sudo ln -s /snap/bin/code-insiders /usr/bin

and then all done. then i could run code from terminal by using

$ code-insiders .