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.

https://code2care.org/howto/install-homebrew-brew-on-mac/

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

    Logs:

     % brew install --cask visual-studio-code
    ==> Downloading https://update.code.visualstudio.com/1.82.3/darwin-arm64/stable
    ==> Downloading from https://az764295.vo.msecnd.net/stable/fdb98833xx5a29
    ######## 100.0%
    ==> Installing Cask visual-studio-code
    ==> Moving App 'Visual Studio Code.app' to '/Applications/Visual Studio Code.app'
    ==> Linking Binary 'code' to '/opt/homebrew/bin/code'
    🍺  visual-studio-code was successfully installed!

    As you can see from the logs, Visual Studio Code.app 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) is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

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