Xcode command-line tools can be downloaded in two ways.
- To install Xcode tools using Xcode on the Mac
First, Xcode must be started on the Mac. Then, from the Xcode menu, click Preferences. Following that go to the general panel and click Downloads. Components tab must be chosen on the Downloads window anon. Finally, click to Install button next to Command Line Tools.
(You will be asked for your Apple Developer Login during the installation process.)
- To install Xcode tools from the web, Xcode command line tools can be downloaded directly from the developer portal as a .dmg file. Go to https://developer.apple.com/downloads/index.action from the Mac. (You will be asked for your Apple Developer Account during the installation process.) After that, select the Command Line Tools entry that you prefer from the Downloads for Apple Developers list.