Introduction

VS code is an excellent free IDE for maany types of programming languaages. Lets take a look aat how we can add its executable path in our system path so that we can open it from our terminal or command line.

From VS Code itself

  • Open VS Code
  • Press Command + Shift + P OR From View menu, click on Command Palette

Type:

>Shell command: Install

You will see one option like below:

VSCode Executable path

Thats it. It was so simple. No need to run any command to update your PATH variable.

Open Source code in VS Code from terminal

Now that vs code executable is added in your system path. You just need to open your terminal.

Example: Your source code is at folder:

/Users/test/github/myproject

Simply run (from anywhere)

code /Users/test/github/myproject

Or you can goto that code folder by cd command. And run:

code .

VS code is so light weight that you can use it as notepad. i.e. open any kind of text file in this IDE.