How to open VSCode from terminal?
Although there might be many ways to do this like editing the bashrc or zshrc file, but the below method is easy and works like a charm.
- Open VSCode and press
Command
+Shift
+P
- Then type
Shell
in command palette - You will see
Shell Command: Install Code in Path
Click that and you are done!
You can now open your terminal and type
code .
To open a particular directory in VSCode, go to that directory in terminal and type
code .
or alternativelycode [path of the folder]