How to Install Command Line Tools in Mac OS X (Without Xcode)

Mac users who prefer to have a more traditional Unix toolkit accessible to them through the Terminal may wish to install the optional Command Line Tools subsection of the Xcode IDE. From MacOS High Sierra, Sierra, OS X El Capitan, Yosemite, Mavericks onward, this is now easily possible directly and without installing the entire Xcode package first, no developer account is required either.

The Command Line Tool package gives Mac terminal users many commonly used tools, utilities, and compilers, including make, GCC, clang, perl, svn, git, size, strip, strings, libtool, cpp, what, and many other useful commands that are usually found in default linux installations. We’ve included the full list of new binaries available through the command line toolkit below for those interested, or you can just see for yourself after you have installed the package, which we’ll walk through here.

Installing Command Line Tools in Mac OS X

Launch the Terminal, found in /Applications/Utilities/

Type the following command string:

xcode-select --install

A software update popup window will appear that asks: “The xcode-select command requires the command line developer tools. Would you like to install the tools now?” choose to confirm this by clicking “Install”, then agree to the Terms of Service when requested (feel free to read them thoroughly, we’ll be here)

Wait for the Command Line Tools package download to complete, it’ll be about 130MB and installs fairly quickly depending on your connection speed

The installer goes away on its own when complete, and you can then confirm everything is working by trying to use one of the commands that were just installed, like gcc, git, svn, rebase, make, ld, otool, nm, whatever you want from the list below. Assuming the installation went uninterrupted, the command will execute as expected. This also means you can compile and install things from source code directly without having to use a package manager. Enjoy your new unix command line toolkit!

What Installs with Command Line Tools and Where

For those interested in knowing the details of what is installed on their Mac and where it’s going, the entire command line toolkit package gets placed in the following directory:

/Library/Developer/CommandLineTools/

You can browse through that directory if you want to, or you can just have awareness of it just in case you want to modify or adjust any of the package at a later time.

Note that directory is the root /Library of Mac OS, not a user ~/Library directory.

If you want to see the 61 new commands available to you, they’re all in /Library/Developer/CommandLineTools/usr/bin/ but we have also listed them alphabetically below for convenience:

Troubleshooting “not currently available” error

Getting an error message that says “Can’t install the software because it is not currently available from the Software Update server”? Well you’re in luck, because that error message probably indicates you already have Xcode installed on the Mac.

From Mac OS X 10.9 onward, if Xcode is already installed in Mac OS X then Command Line Tools becomes installed as well (you can check this by trying to run gcc or make from the terminal). Accordingly, this tutorial is aimed at users who do not want to install the broader Xcode development package, and would rather only have the command line utilities installed instead. Yes, that means you can uninstall the entire Xcode app and only install the command line tools if you want to, since for many users and sysadmins that’s the only reason they installed Xcode to begin with.

Another simple way to install these tools is simply to try to run one of them. If it’s not installed, OS X will give you a prompt that asks if you want to install it. If you agree, it does it quickly and easily!

On my system they are not located in /Library/Developer/CommandLineTools/

I don’t know if I did something different during the install or if it’s because I did the install via Xcode (I stumbled upon this article simply because I was trying to find *where* the tools were installed).

Anyhow, mine ended up in /usr/bin

Just putting that out there in case something has changed since this was written.

Thanks for the info though, it helped me finally figure out where the binaries were and what to look for (list helped a lot).

i have installed command line tools like you suggested on my mavericks 10.9.5 .now further how to operate c or c++ like where to write the programs ,how to compile or how to run..i have no idea about all that..

Fails with a “Can’t download the software because of a network problem.” Maybe now that 10.10 is out they don’t support this for 10.9?
I just downloaded the older 10.9 command line package from developer. Might not be quite as up to date but 12/2/2014 should be recent enough.

But, if I want use wget how do i do .. ?
That command were not installed, but it’s was in the CommandLineTools package before.
I juste reboot my mac and I have this error wget : command not found.. Even if I install Xcode correctly.

You have to enter exact syntax at the command line, if you combine words or commands with a flag or parameter the command will always show an error. The command line offers no leeway or forgiveness, everything must be precise and exact.

There can be other reasons you see ‘command not found’ error too but in your situation it is simply because the command was entered improperly.

This website and third-party tools use cookies for functional, analytical, and advertising purposes. By continuing to browse the site, closing this banner, scrolling this webpage, or clicking a link, you agree to these cookies. You can review our privacy policy for additional information.I AcceptPrivacy Policy