Launch VCode in Command Line

Venkat.R
HTML5 School
Published in
1 min readApr 8, 2018

You can launch Visual Studio Code from the windows / mac terminal by typing ‘code’ after adding it to the path:

Steps to launch

  • Launch VS Code.
  • Open the Command Palette (⇧⌘P in Mac) and type ‘shell command’ to find the Shell Command: Install ‘code’ command in PATH command.
In Visual Studio Code
  • Restart the terminal for the new $PATH value to take effect. You'll be able to type 'code .' in any folder to start editing files in that folder.

In Windows, This command will be available by default.

How to configure my own command to launch VCode ?

In Mac: To manually add VS Code to your path

cat << EOF >> ~/.bash_profile
# Add Visual Studio Code (code)
export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
EOF

In Windows, Open the Bin folder of Visual Code installed directory for example

Location: C:\Program Files\Microsoft VS Code\bin\code.cmdCopy this File and rename it or follow the below command$ cp C:\Program Files\Microsoft VS Code\bin\code.cmd C:\Program Files\Microsoft VS Code\bin\vscode.cmd

Happy Coding !

--

--

Venkat.R
HTML5 School

👨‍💻 React, Full Stack Engineer | Father | Career Coach | Mentor | 📗 Blogger | Ex-Yahoo, Visa, Target, Proximus— webslate.io