Yogesh Chauhan's Blog

How to Install Xcode Command Line Tools on MacOS?

in Miscellaneous on January 8, 2022

Install Xcode Command Line Tools with Homebrew

A bit about Homebrew

Homebrew is a popular package manager for macOS. It gives you an easy way to install Xcode Command Line Tools.

The updated homebrew installation gives you an option to install the Xcode Command Line Tools when you install homebrew on MacOS, which is a step forward in helping the developers setting up the right tools for development.

Homebrew gives you an option to install many many open source dev tools.

Steps to install Xcode Command Line Tools using Homebrew

Use this code to initiate homebrew installation

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

You’ll need to type your password after the code above starts executing. After the correct password, you’ll see a list of files and folders installing one by one.

Assuming that you don’t have XCode Command Line Tools installed on your machine, you’ll see this message.

“The XCode Command Line Tools will be installed.”

All you need to do is press the return key to keep the installation continue.

Verify the installation

brew doctor

If everything went well in the installation process, you’ll see this message:

Your system is ready to brew

Using this method, we can install both Xcode Command Line Tools and Homebrew.

Install Xcode Command Line Tools using the Command Line

Sounds weird, doesn’t it?

Start the installation using this command

xcode-select --install

A window prompt will be opened outside of the terminal. Click on Install and it’ll be downloaded and installed in a few minutes.

Verify the installation

xcode-select -p

You’ll see the directory where the Command Line Tools are installed.


Most Read

#1 Solution to the error “Visual Studio Code can’t be opened because Apple cannot check it for malicious software” #2 How to add Read More Read Less Button using JavaScript? #3 How to check if radio button is checked or not using JavaScript? #4 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #5 How to uninstall Cocoapods from the Mac OS? #6 PHP Login System using PDO Part 1: Create User Registration Page

Recently Posted

#Apr 8 JSON.stringify() in JavaScript #Apr 7 Middleware in NextJS #Jan 17 4 advanced ways to search Colleague #Jan 16 Colleague UI Basics: The Search Area #Jan 16 Colleague UI Basics: The Context Area #Jan 16 Colleague UI Basics: Accessing the user interface
You might also like these
4 ways to create Date Objects in JavaScriptJavaScriptColleague UI Basics: The Context AreaColleagueEssential SQL Commands We Need to KnowSQL/MySQLWordPress: How to print ACF array field values?WordPressWhat is Etrieve Flow?MiscellaneousCheck If a String Contains a Specific Word in PHPPHP