If you have installed Microsoft Visual Studio Code on your Mac device and when you try to open it from the ZSH shell in your terminal and you get the 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 to 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 the Applications directory or use the path where it resides.
Facing issues? Have Questions? Post them here! I am happy to answer!
- [fix] zsh: illegal hardware instruction python TensorFlow M1/M2 Mac
- macOS Ventura 13: The default interactive shell is now zsh
- Fix: cd: string not in pwd
- How to reload Zsh .zshrc Profile
- Resolve - zsh: command not found: code
- Ubuntu zsh: command not found: nano
- Fix: zsh: command not found: mysql (Mac XAMPP)
- Setting up Zsh Syntax Highlighting
- Fix zsh: permission denied: script.sh
- Fix - zsh: command not found: conda [macOS]
- zsh: command not found [fix] macOS
- ZSH: exec format error eclipse M1/M2 Mac
- Fix for zsh: command not found: brew
- Fix: zsh: command not found: npm after installation (Node.js)
- How to reload zsh shell profile file?
- How to Add New Entry to ZSH PATH
- How to make ZSH as the default shell on Ubuntu
- How to fix: zsh: command not found: jupyter
- How to clear ZSH history of commands executed on Mac Terminal
- Fix - zsh: command not found: pip
- Fix - cd: no such file or directory: .zshrc
- Add Syntax Highlighting in Zsh Shell
- Fix: ZSH: cd: too many arguments (macOS)
- Trace using cURL Command Example - cURL
- How to create MD5 digest in Notepad++ - NotepadPlusPlus
- Enable Native Dark Mode in Notepad++ - NotepadPlusPlus
- How to add days to a date in Python - Python
- Java Stream flatmap() Examples - Java
- See actual SharePoint error exception modify web.config - SharePoint
- Sublime Text 3 spell check shortcut - Sublime
- 18: Get Sub List By Slicing a Python List - 1000+ Python Programs - Python-Programs