Last Updated : 23 Jul, 2025
Did you know you can launch Visual Studio Code directly from your terminal? It's quick, efficient, and makes coding workflows much smoother. In this guide, we'll show you how to set it up on both Windows and macOS.
How to Open VS Code From Terminal?To open VS Code, you need to make sure VS Code is in your system's PATH. For that, open VS Code and configure a few VS Code settings.
Steps to Add VS Code to Your System PATH"Ctrl
+ Shift
+ P
or Cmd + Shift + P (on macOS) to open the Command Palette.Done! You can now launch VS Code directly from your terminal using the code command.
Steps to Open Visual Studio Code From Terminal Step 1: Open the TerminalNote: If you don't have VS code, install VS code for your Windows, Mac or Ubuntu operating system.
Command 1: To open VS code in the current directory.
Code
Command 2: To open a specific file or folder in VS code.
code [path to file]
Command 3: To start a new project in VS code
code -n
For more such commands, get help using the following command. It displays VS Code command-line options and descriptions.
code --help
And That's it, Now you know how to open Visual Studio Code directly from the terminal whether it's a current directory, a specific file, or a new project on windows, macOS, or Linux.
Visual Studio Code is a streamlined code editor with support for development operations like debugging, task running, and version control. Starting VS code from the terminal allows developers to run commands quickly and efficiently, making coding faster and more convenient.
Hence, we have successfully accessed VS code using terminal in Windows or MacOS.
Also ReadConclusion
Accessing Visual Studio Code (VS Code) from the terminal is a simple yet powerful skill for any developer. Whether you're working on Windows, macOS, or Linux, starting VS Code from the terminal can speed up your workflow and make project management easier. Just make sure the code command is installed, and you're good to go!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4