Mac users (mostly programmers) who prefer to access more traditional Unix toolkits through terminals will choose to install the optional command-line tool subset of the Xcode IDE, that is
Command Line Tools。
Starting with MacOS High Sierra, Sierra, OS X El Capitan, Yosemite, Mavericks, you can install it separately without first installing the entire Xcode package or logging into the developer account.
Command Line Tools。
- So this article is applicable to MacOS 10.13 High Sierra, 10.12 Sierra, OS X 10.11 El Capitan, OS X 10.10 Yosemite, MacOS X 10.9 and later versions.
- Mac users running earlier versions of OS X can access this article Xcode Command Line Tools
Command Line ToolsIt is a small stand-alone package that provides MAC end users with many common tools, utilities and compilers. Includes svn, git, make, GCC, clang, perl, size, strip, strings, libtool, cpp, what and many other useful commands found in the default Linux installation.
A complete list of commands in this toolkit will be listed later, or you can view them yourself after installation.
- Start the terminal or iterm terminal
- Enter the following command string
The following pop-ups will appear. Just click Installation.
- Then there will be an agreement to the terms of service pop-up, click on the agreement can be
- Waiting for download
- Installation will be prompted after completion of installation, click Installation Completion.
- You can then confirm that the installation was successful by trying to use one of the commands just installed, such as
gcc -v git version
Where is the package actually installed?
If you are interested in what’s in the package, you can check the contents of the package yourself. It is installed in the root directory of MAC
Note: In the root / directory, not the user directory ~/..
61 new commands available are in / Library / Developer / CommandLineTools / usr / bin /.
The following commands are listed alphabetically:
ar as asa bison BuildStrings c++ c89 c99 cc clang clang++ cmpdylib codesign_allocate CpMac cpp ctags ctf_insert DeRez dsymutil dwarfdump dyldinfo flex flex++ g++ gatherheaderdoc gcc gcov GetFileInfo git git-cvsserver git-receive-pack git-shell git-upload-archive git-upload-pack gm4 gnumake gperf hdxml2manxml headerdoc2html indent install_name_tool ld lex libtool lipo lldb lorder m4 make MergePef mig mkdep MvMac nasm ndisasm nm nmedit otool pagestuff projectInfo ranlib rebase redo_prebinding ResMerger resolveLinks Rez RezDet RezWack rpcgen segedit SetFile size SplitForks strings strip svn svnadmin svndumpfilter svnlook svnrdump svnserve svnsync svnversion unifdef unifdefall UnRezWack unwinddump what xml2man yacc
Reference article: How to Install Command Line Tools in Mac OS X (Without Xcode)