
If you have installed Microsoft Visual Studio Code on your Mac device and when you try to open it from zsh shell in your terminal and you get error: zsh: command not found: code the reason is that you have not set the PATH for VS Code in your zsh profile.
Solution:
- Open Zshrc profile file using - nano ~/.zshrc
- Now add the below line at the file,
export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
- Now exit Nano, by pressing command + X and save changes.
- Apply the changes by tying source ~/.zshrc
- Now you should be able to open vs code using Zsh Shell in Mac Terminal.
❗️ Make sure that the Visual Studio Code.app is available on Applications directory or use the path where it resides.
More Posts related to zsh,
- Ubuntu zsh: command not found: nano
- Setting up Zsh Syntax Highlighting
- Fix for zsh: command not found: brew
- Fix - zsh: command not found: conda [macOS]
- Resolve - zsh: command not found: code
- How to make zsh as the default shell on Ubuntu
- zsh: exec format error eclipse M1 Mac
- [fix] zsh: illegal hardware instruction python TensorFlow M1/M2 Mac
- Fix zsh: permission denied: script.sh
- zsh: command not found [fix] macOS
More Posts:
- Turning Off Chat in Gmail - Google
- How to check if Key Exists in Python Dictionary? - Python
- 2020 Popular Halloween Emoji's and hashtags - Hashtags
- Java 8 Predicate Functional Interface Examples - Java
- How to download and install macOS 13 Ventura - MacOS
- Channel 50 SMSes received every few minutes Android Phones - Android
- Java Code to check if Twitter app is installed on Android device - Android
- Search text in Eclipse Console logs - Eclipse