This article will help you how to install homebrew on macOS.
Homebrew is a free and open-source software package management system that simplifies the installation of software on Apple’s operating system, macOS, as well as Linux.
1. To Install Homebrew on macOS, open a terminal and execute the command below.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
The installation process will prompt for the password. Just enter your password where required to complete the Homebrew installation. The process will take some time.
Once the installation completed, execute the below command to check version.
brew --version Homebrew 3.5.2-2-gedea67f Homebrew /homebrew-core (no Git repository) |
You may also run the below command to ensure everything is configured correctly. below command will show the instructions for correcting any issues.
james@JamesEduard repos % brew doctor Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry or file an issue; just ignore this. Thanks! Warning: A newer Command Line Tools release is available. Update them from Software Update in System Preferences or run: softwareupdate --all -- install --force If that doesn't show you any updates, run: sudo rm -rf /Library/Developer/CommandLineTools sudo xcode- select -- install Alternatively, manually download them from: https: //developer .apple.com /download/all/ . You should download the Command Line Tools for Xcode 13.4. Warning: Homebrew /homebrew-core was not tapped properly! Run: rm -rf "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" brew tap homebrew /core Warning: Some taps are not on the default git origin branch and may not receive updates. If this is a surprise to you, check out the default branch with: git -C $(brew --repo homebrew /core ) checkout |
To upgrade Homebrew, execute the command below in terminal prompt.
cd "$(brew --repo)" git fetch && git reset --hard origin /master && brew update |
To uninstall Homebrew, execute the command below in a terminal prompt.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)" |
2. Install Visual Studio Code on macOS
First, fetch the latest version of homebrew and formula. Then tap the Caskroom/Cask repository from Github. After that search for the visual-studio-code package.
brew update brew tap homebrew /cask brew search visual-studio-code --cask |
Outpu:
==> Casks
visual-studio
visual-studio-code
homebrew/cask-versions/visual-studio-code-insiders
Then install Visual Studio Code by running the following command.
brew install visual-studio-code |
Wait for the installation complete
3. After completing the installation of Visual Studio Code, launch it on your macOS system. After that, you can add the required extensions for your application.
3. Installation done , you may now start your code development with vscode.