Run VSCode from the macOS Terminal

Run VSCode from the Terminal

You can move to a specific directory in the terminal and open a specific file.

$ code [File path]

The setup method is as follows.

  1. Launch Visual Studio Code.
  2. Press Command Palette (⇧⌘P) to open the command palette.
  3. Type shell command, find Shell Command: Install 'code' command in PATH, and run it.