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.
- 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.
- How to make zsh as the default shell on Ubuntu
- Resolve - zsh: command not found: code
- Fix - zsh: command not found: conda [macOS]
- zsh: command not found [fix] macOS
- Setting up Zsh Syntax Highlighting
- Fix for zsh: command not found: brew
- Fix zsh: permission denied: script.sh
- [fix] zsh: illegal hardware instruction python TensorFlow M1/M2 Mac
- How to clear ZSH history of commands executed on Mac Terminal
- Ubuntu zsh: command not found: nano
- How to reload zsh shell profile file?
- macOS Ventura 13: The default interactive shell is now zsh
- zsh: exec format error eclipse M1 Mac
- Create Hidden File or Directory using Shell Command - Linux
- MacoOS - xyz is an app downloaded from the internet. Are you sure you want to open it? Alert - MacOS
- How To Change Mac Terminal Text Color - MacOS
- How to add two float numbers in Python - Python
- Java Get Current Date for a Specific Time Zone - Java
- How to run Gradle build in offline mode - Gradle
- [Gmail] Calling in Hangouts will be turned off soon. - News