How to install VS Code on Mac using Terminal Command

If you want to install Visual Studio Code IDE (VS Code) on your Mac, then you can make use of the Homebrew package manager.

Make sure you have brew installed. If not follow the below article to install it first.

  • Open the Terminal App.
  • Now run the brew Cask command,
    brew install --cask visual-studio-code


     % brew install --cask visual-studio-code
    ==> Downloading
    ==> Downloading from
    ######## 100.0%
    ==> Installing Cask visual-studio-code
    ==> Moving App 'Visual Studio' to '/Applications/Visual Studio'
    ==> Linking Binary 'code' to '/opt/homebrew/bin/code'
    🍺  visual-studio-code was successfully installed!

    As you can see from the logs, Visual Studio file has been installed and added to the Applications folder.

  • Now you can open VS Code by simply typing code in your macOS Terminal prompt or use Spotlight search to open it.
Run VS Code from Mac Terminal Example

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap