Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • DSA
  • Practice Problems
  • Python
  • C
  • C++
  • Java
  • Courses
  • Machine Learning
  • DevOps
  • Web Development
  • System Design
  • Aptitude
  • Projects
Open In App
Next Article:
How to Open the Terminal on a Mac
Next article icon

How to Open VS Code Using Terminal?

Last Updated : 20 May, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

Getting all your projects using a terminal is a new fun! Yes, you heard it right, you can access VS Code projects using the terminal, which is nothing but short and easy-to-remember commands. Starting VS code from the terminal provides a convenient and efficient way, especially for developers who are comfortable with the command line. This article will let you know How to open VS Code from Command-Line.

In this article, we’ll learn how to open VS Code using the terminal on both Windows and macOS. The process is the same for both operating systems. Now, dwelling further, we need to follow sequential steps to start VS Code from the terminal, which is as follows:

Ensure VS Code is in Your System’s Path

You need to make sure the VS Code is in your system’s PATH. For that open VS code and configure a few VS Code Settings.

  • Open VS Code.
  • Press Ctrl + Shift + P to open the Command Palette.
  • Type “Shell” and select “Shell Command: Install ‘code’ command in PATH.” and hit Enter

How-to-Open-VS-Code-Using-Terminal

Now you can access VS Code using terminal.

Note: If you don’t have VS code, install VS code for your Windows, Mac or Ubuntu operating system.

How to Open VS Code From Terminal?

  • To Open VS Code, First Open the terminal in Windows ( Ctrl + Alt + T ) or Mac ( command + T ).
  • Type the following commands to open VS Code.

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

Check out: How to Create a File in VSCode using Terminal?

For more such commands, get help using the following command. It displays VS Code command-line options and descriptions.

code --help

code---help-command

That’s it, This is how you can Open VS Code from Terminal as well as you can also open the file or folder in VS Code from the terminal on both Windows and macOS.

Visual Studio Code is a streamlined code editor with support for development operations like debugging, task running, and version control. Starting VS code from terminal allows us to send simple text commands to our computer to do things way more fast and easy.

Hence, we have successfully accessed VS code using terminal in Windows or MacOS.

Also Read

  • General Keyboard Shortcuts For Visual Studio Code!
  • How to Open a GitHub Repository in VS Code Online?
  • How to Enable Live Server on Visual Studio Code?

Conclusion

Accessing Visual Studio Code (VS Code) from the terminal on both Windows and macOS is a convenient and efficient way for developers, especially those comfortable with the command line. By following simple steps to ensure VS Code is in your system’s PATH, you can easily open VS Code and work on your projects directly from the terminal.



Next Article
How to Open the Terminal on a Mac

H

harshbaidind
Improve
Article Tags :
  • TechTips

Similar Reads

  • How to Create a File in VSCode using Terminal?
    In a few cases touch or new-item or any other base keywords may not be used to create a file in vs code due to the absence of extensions, but using the following approach you can create and code any type of file with ease. In this article, you will learn about how to create a file with any file type
    3 min read
  • How to Install Git in VS Code?
    Git is a free and open-source distributed version control system. It is designed to manage every type of project even a small or a large project with good speed and efficiency. It is more focused on distributed development of software so that more developers can have the access to the source code an
    2 min read
  • How to Open the Terminal on a Mac
    The Terminal on Mac is a powerful tool that allows you to interact with your computer using command-line instructions. Whether you're a developer, system administrator, or a curious user, knowing how to open the Terminal on a Mac is essential for performing advanced tasks, automating processes, or s
    6 min read
  • How to Open Terminal in Linux?
    The Shell or Command Prompt are common name for the Linux Terminal. The terminal was designed as a Linux File Browser, and this function is still carried out using it. You may traverse your files and undo changes made by using the Terminal as a File Browser. However, the very first step will be to O
    4 min read
  • How to Install Hyper Terminal on Windows?
    A hyper terminal is a terminal where we can write commands to interact with our computer system. Using command lines, we can interact with the computer without the use of GUI (Graphical user interface). Here the question arises of why we have to interact with computers. The answer is, to get our tas
    3 min read
  • How Do I Disable VS Code of Updating Itself?
    Visual Studio Code is a powerful and popular code editor that frequently receives updates to improve functionality and security. However, these automatic updates might not always be convenient, especially if you prefer to control when your tools are updated. If you're looking to disable VS Code auto
    6 min read
  • How to Push Code to Github using Pycharm?
    Git is an open-source version control system. It means that whenever a developer develops some project (like an app or website) or something, he/she constantly updates it catering to the demands of users, technology, and whatsoever it maybe, Git is a version control system that lets you manage and k
    2 min read
  • How to Use Terminal in Sublime Text Editor ?
    Well in Visual Studio Code we get a direct Option for opening Terminal, Unlike Sublime Text editor. Sublime is Simple and free to use, Light on memory, and can easily work with multiple projects. In this article, we will see how to use Terminal in a Sublime Text Editor. This article will answer all
    3 min read
  • How to Install Vim Editor in Ubuntu?
    Vim is a highly configurable and powerful text editor used by developers and system administrators on Ubuntu and other Linux distributions. Whether you’re coding, writing scripts, or editing configuration files, Vim offers efficiency with its vast features and keyboard shortcuts. In this guide, we'l
    3 min read
  • How to Install Cmder on Windows?
    Cmder is a command prompt user interface. It is often used in windows machines mainly. Generally, users like to interact with graphical user interfaces. As in command prompt in windows are not that graphical. Understanding some concepts of the GUI method is most important nowadays. Cmder is one of t
    2 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences