Skip to content

zsh 'code' command not found


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.


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).

Terminal window
echo "export PATH=\"\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin\"" >> ~/.zshrc
source ~/.zshrc

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.