zsh 'code' command not found
Solution(s)
Section titled “Solution(s)”1. Ensure Visual Studio Code is in Applications folder
Section titled “1. Ensure Visual Studio Code is in Applications folder”Check your “Applications” folder contains the “Visual Studio Code” app.
If it is missing from this folder, find where it is currently located and drag the file into the Applications folder.
2. Add the ‘code’ path to your PATH
Section titled “2. Add the ‘code’ path to your PATH”If you are having issues getting the code
command to work, an alternative method you can try is to run the following command (adapted from the Alternative Manual Instructions section).
echo "export PATH=\"\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin\"" >> ~/.zshrcsource ~/.zshrc
3. Update permissions
Section titled “3. Update permissions”If you are still having issues, try following the steps on the 2. .zshrc permission issues page first, then come back to repeat the steps above.