How To Start Visual Studio Code From The Terminal

You can quickly launch Visual Studio Code using your computer’s terminal. The following guide shows the steps to run VS Code from the terminal. This guide is applicable for both Windows as well as Mac users. Before we begin, make sure you have your terminal open.

How To Launch a New VS Code Window From The Terminal?

Enter the following code in the terminal:

code -n

Then, hit Enter.

New Window
Type code -n in the terminal and press Enter,

How To Open A File, Folder, or Project From The Terminal?

First, navigate to the folder’s directory. You can use the cd command to navigate to the directory. For example, let’s say we want to open a folder named “Practice” stored on the Desktop. Run the following code:

cd Desktop
cd Practice
code .
Project
Navigate to the folder and run the code . command.

Your project folder will be opened in the VS Code.

Was this article helpful?

Leave a Comment