"code ." does not work on linux Mint (zsh terminal)

Asked

Viewed 814 times

0

I’m trying to use the command "code." zsh terminal to open the folder in vscode, but when I run the command it returns me the following error message:

zsh: no such file or directory: /Applications/Visual Studio Code.app/Contents/Resources/app/bin/code

I saw in other questions this path that it indicates above, however I did not find it in my computer, I tried to add to the PATH and also did not work.

  • How can I make the command code . work on my terminal?

3 answers

-2

Run this command on your terminal to check where the VS Code binary is:

which code

By default it must be on

/usr/bin/code

Then you change its PATH to use this directory

  • 2

    It does not solve the problem. The which search in PATH and not in filesystem. If the system does not find in PATH the which also will not locate.

-2

good morning, I had the same problem when I did the installation of VS Code by the linux Mint application store, I was able to solve my problem by simply uninstalling vs code which in case was Flatpak and went to the vs code website itself: https://codevisualstudio.com/ And I went down there, now I can run it on the terminal with the code command. I hope I helped, hugs!

-3

You can make the VS Code add the PATH.

Ctrl+p

>>comando em shell, adicionar o comando "code" em path.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.