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.


/Library/Developer/CommandLineTools


Most Read

#1 How to check if radio button is checked or not using JavaScript? #2 How to add Read More Read Less Button using JavaScript? #3 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #4 How to uninstall Cocoapods from the Mac OS? #5 PHP Login System using PDO Part 1: Create User Registration Page #6 How to Use SQL MAX() Function with Dates?

Recently Posted

#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 #Jan 14 How to display a student’s individual transcript in Colleague? #Jan 11 How to install PuTTY on a MacOS?
You might also like these
File System Integrity: How to Keep an Eye on Your Files and Folder Change?MiscellaneousWhat is XP (Extreme Programming) and When should it be used?MiscellaneousHow to create a multisite network in WordPress?WordPressWordPress: How to find all posts from a custom post type with specific custom field?WordPressHow to create a simple text and image slider using CSS and JavaScript?CSSUse eq() method in jQueryjQuery