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 Big Sur:
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 Big Sur:

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 Big Sur 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 Big Sur. You can also explore more articles we’ve on macOS: