Skip to content
Related Articles

Related Articles

How to start VS Code from the terminal (command line)?

View Discussion
Improve Article
Save Article
  • Last Updated : 05 Jul, 2022
View Discussion
Improve Article
Save Article

Visual Studio Code is a streamlined code editor with support for development operations like debugging, task running, and version control. It provides tools for a user to build hassle-free codes.

Using a terminal allows us to send simple text commands to our computer to do things way more fast and easy.

Now dwelling further, we need to follow sequential steps in order to start VS Code from the terminal, which is as follows:

  1. Open Terminal 
  2. Navigate to the folder or file you want to open
  3. Type type “code . ” or “code [path to file]

Step 1: Open Command Prompt in Windows or Terminal Window in Mac



Step 2: Then navigate using cd command to the folder you want to open



Step 3:  Then type code .  to open the editor, in that folder 

> code .

or you can type code some/path/

> code some/path/

or, code folder_name 

> code DSA_Folder

 or, code file_name

> code DSA_Q1.cpp



That’s it, now you opened the file or folder in your favourite code editor – VS Code

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!