Dhairya Shah
Dhairya Shah's Blog

Dhairya Shah's Blog

How to open Visual Studio Code from Terminal - (MAC)

How to open Visual Studio Code from Terminal - (MAC)

Dhairya Shah's photo
Dhairya Shah
ยทSep 16, 2022ยท

1 min read

Subscribe to my newsletter and never miss my upcoming articles

Play this article

I recently discovered a quick way to launch Visual Studio Code from the terminal.

To do so, launch Terminal on your Mac and enter the following code:

$ code .

To open a specific directory

$ code PATH

This will open VS Code ๐ŸŽ‰

If you are encountering some error using this command in the Mac terminal, then here is the solution:

Error: Shell Command: Install 'code' command in PATH

Inside Visual Studio Code, pressed cmd + shift + p and search for path and choose the following command:

Path add

This will fix the error and you can open VS Code from terminal.

Thanks for reading

Follow me on Twitter

Thanks for reading!

ย 
Share this