Install XCode Command Line Tools on macOS

Xcode is the development and debug environment that provides the required development files for Mac OS X and iOS applications. By installing the Developer command line tools you’ll get the macOS SDK, headers, and build tools such as the Apple LLVM compiler and Make. As a developer for Mac OS X and iOS applications, these tools make it easy to install open source software or develop applications on UNIX within Terminal.

In this article we show macOS users how to install XCode Command Line Tools from the terminal. To get started launch your terminal and run the following commands to install XCode Command Line Tools on macOS:

xcode-select --install
sleep 1
osascript <<EOD
  tell application "System Events"
    tell process "Install Command Line Developer Tools"
      keystroke return
      click button "Agree" of window "License Agreement"
    end tell
  end tell
EOD

If you’re asked for password input user’s password to escalate privileges as required.

Select “Install” to begin installation of XCode Command Line Tools on macOS:

If additional tools need to be installed accept the prompts give to proceed.

Then wait for the downloading and installation of XCode Command Line Tools on macOS to complete.

Confirm if the installation was successful by running the following command:

$ xcode-select -p
/Applications/Xcode.app/Contents/Developer

This will print the Command Line tools directory.

You can also verify by checking the version of CLT:

$ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 16.2.0.0.1.1733547573
volume: /
location: /
install-time: 1734862802

Checking xcode-select version:

$ xcode-select --version
xcode-select version 2409.

Running brew config should also show the version of Xcode CLT version:

$ brew config
HOMEBREW_VERSION: 4.4.23
ORIGIN: https://github.com/Homebrew/brew
HEAD: 64efed206deeb9c2304d9e5b5910dcbf0a509c15
Last commit: 9 days ago
Branch: stable
Core tap JSON: 10 Mar 12:07 UTC
Core cask tap JSON: 10 Mar 12:07 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 3.3.7 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.7/bin/ruby
CPU: octa-core 64-bit icelake
Clang: 15.0.0 build 1500
Git: 2.46.0 => /usr/local/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.3.1-x86_64
CLT: 16.2.0.0.1.1733547573
Xcode: 15.4

I hope this guide helped you to install XCode Command Line Tools on macOS system. You can also explore more articles we’ve on macOS:

Your IT Journey Starts Here!

Ready to level up your IT skills? Our new eLearning platform is coming soon to help you master the latest technologies.

Be the first to know when we launch! Join our waitlist now.

Join our Linux and open source community. Subscribe to our newsletter for tips, tricks, and collaboration opportunities!

Recent Post

Leave a Comment

Your email address will not be published. Required fields are marked *

Related Post

Taking screenshots is one of the many important features of our devices. Once in a while, every one of us […]

AlmaLinux OS is a Linux operating systemd forked from RHEL by the team behind CloudLinux. It is meant to be […]

I recently experienced the error Failed creating Qemu driver: exec: “qemu-system-x86_64”: executable file not found in $PATH while trying to […]

Let's Connect

Unleash the full potential of your business with CloudSpinx. Our expert solutions specialists are standing by to answer your questions and tailor a plan that perfectly aligns with your unique needs.
You will get a response from our solutions specialist within 12 hours
We understand emergencies can be stressful. For immediate assistance, chat with us now

Contact CloudSpinx today!

Download CloudSpinx Profile

Discover the full spectrum of our expertise and services by downloading our detailed Company Profile. Simply enter your first name, last name, and email address.