How to install Visual Studio Code's `code` command permanently?
Looks like your whole Visual Studio got installed in a temporary folder.

Remove the current link with sudo rm /usr/local/bin/code

Start Visual Studio from within /Applications

Reinstall code as described in https://stackoverflow.com/a/29971430:

Now open the Command Palette (F1 or ⇧⌘P on Mac) and type shell command to find the Shell Command: Install 'code' command in PATH command.



If it still doesn't work you can also link manually by running
sudo ln -fs &quot;/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code&quot; /usr/local/bin/