Mac users with macOS Mojave and macOS Catalina, and new operating systems in place can now install Command Line Tools from the Xcode IDE without needing to install the entire Xcode package, or opening an Apple developers account.
Dec 11, 2019 Wait for the Xcode Command Line Tools package to install. It is around 130 MB and usually installs fairly quickly; although it depends on your connection. Once everything is installed, the installer goes away and you should be able to any of the new commands that you’ve now got access to. Enjoy using your new Unix command line tools!
In this article, we cover how you can install this optional and highly useful Command Line Tools package.
X code 11. Credit: developerinsider
What is the Xcode Command Line Tools package?
For Mac power users — we wouldn't recommend downloading this unless you are comfortable with Terminal — the Xcode Command Line Tools package gives you a complete Unix toolkit accessible through Terminal. No developer account needed and you don't need to download the entire — and quite large Xcode package of executables.
Within the Xcode Command Line toolkit, Mac users gain access to numerous useful tools, utilities, and compilers, including make, GCC, clang, perl, svn, git, size, strip, strings, libtool, cpp, and many others. All of these commands are a default part of Linux systems and programs.
We recommend following these steps for those with the following operating systems running on a Mac: macOS 10.13 High Sierra, macOS 10.14 Mojave, and macOS 10.15 Catalia onward. It isn't always possible to download these Xcode Command Line Tools, following these steps, on Mac’s running older operating systems. Other ways to install command tools and gcc (without needing Xcode) is available through the Apple Developer website.
Here is how you install Xcode Command Line Tools.
How to install Xcode Command Line Tools?
- Go to Terminal in /Applications/Utilities/.
- Input the following command string in Terminal:
- In the same way when you are downloading new software and apps, a popup update window will appear asking you: “The xcode-select command requires the command line developer tools. Would you like to install the tools now?”
- Select confirm by clicking Install.
- Wait for the Xcode Command Line Tools package to install. It is around 130 MB and usually installs fairly quickly; although it depends on your connection.
- Once everything is installed, the installer goes away and you should be able to any of the new commands that you’ve now got access to. Enjoy using your new Unix command line tools!
With this new download, you should have access to 61 Unix command line tools. For example, one of the advantages of having these tools is you can install new apps and software directly from the source code instead of needing to go through the package manager and usual download route.
To access or view everything you've now got, go to the following directory:
Please note, this is the root /Library of your macOS/OS X, not the ~/Library directory.
All of these tools can also be found in:
What happens if I encounter problems downloading these?
If you get an error message that says “Can’t install the software because it is not currently available from the Software Update server”, it means you've already got the Xcode package on your Mac. Mac OS X 10.9 onward, Xcode was already installed, which is why you aren't able to download these tools. However, what you can do is uninstall the entire Xcode app if you'd prefer to only access these tools and not a whole load of software that isn’t going to be of much use.
Mac Os Terminal Commands
Watch out for Xcode junk
The Xcode junk is one of those types of clutter that is keeps accumulating in remote places on your Mac. It could take up a few gigs of your space. The only app that seems to address this problem is CleanMyMac X by MacPaw. It’s loved by many Mac developers because it collects those specific types of development junk, like Xcode or outdated libraries.
It also includes free music and stock photos and images you can add to your video, and add transitions and some basic effects. However, the free version limits the resolution of export files to 720p MP4 files. However, its interface is a bit confusing, ads are intrusive, and it only exports movies in MP4 format. Best image editting software mac. If you pay for a subscription ($24.99/month, $174/year, or a one-time fee of $473.99), this restriction is lifted, and you gain access to a host of other functions, including 3D and the ability to export files in a multitude of formats.is just that: a web-based video editing program, which means that you can use it on any computer with a web browser.
Once you launch the app, click on System Junk > Scan. Then, click “Review Details”
CleanMyMac X is a powerful Mac performance improvement app. It makes your Mac as good as new. Let it scan your system and clear out any unwanted Xcode, development and system junk that is taking up too much space and cluttering up your Mac. In a few clicks, your Mac could be running smoother, quicker and more efficiently.
Reinstall from macOS Recovery
macOS Recovery makes it easy to reinstall the Mac operating system, even if you need to erase your startup disk first. All you need is a connection to the Internet. If a wireless network is available, you can choose it from the Wi-Fi menu , which is also available in macOS Recovery.
1. Start up from macOS Recovery
To start up from macOS Recovery, turn on your Mac and immediately press and hold one of the following sets of keys on your keyboard. Release the keys when you see an Apple logo, spinning globe, or other startup screen.
Reinstall the latest macOS that was installed on your Mac (recommended).
Upgrade to the latest macOS that is compatible with your Mac.
Reinstall the macOS that came with your Mac, or the closest version still available.
You might be prompted to enter a password, such as a firmware password or the password of a user who is an administrator of this Mac. Enter the requested password to continue.
When you see the utilities window, you have started up from macOS Recovery.
2. Decide whether to erase (format) your disk
You probably don't need to erase, unless you're selling, trading in, or giving away your Mac, or you have an issue that requires you to erase. If you need to erase before installing macOS, select Disk Utility from the Utilities window, then click Continue. Learn more about when and how to erase.
3. Install macOS
When you're ready to reinstall macOS, choose Reinstall macOS from the Utilities window. Then click Continue and follow the onscreen instructions. You will be asked to choose a disk on which to install.
- If the installer asks to unlock your disk, enter the password you use to log in to your Mac.
- If the installer doesn't see your disk, or it says that it can't install on your computer or volume, you might need to erase your disk first.
- If the installer is for a different version of macOS than you expected, learn about macOS Recovery exceptions.
- If the installer offers you the choice between installing on Macintosh HD or Macintosh HD - Data, choose Macintosh HD.
Please allow installation to complete without putting your Mac to sleep or closing its lid. During installation, your Mac might restart and show a progress bar several times, and the screen might be empty for minutes at a time.
If your Mac restarts to a setup assistant, but you're selling, trading in, or giving away your Mac, press Command-Q to quit the assistant without completing setup. Then click Shut Down. When the new owner starts up the Mac, they can use their own information to complete setup.
macOS Recovery exceptions
The version of macOS offered by macOS Recovery might vary in some cases:
- If macOS Sierra 10.12.4 or later has never been installed on this Mac, Option-Command-R installs the macOS that came with your Mac, or the closest version still available. And Shift-Option-Command-R isn't available.
- If you erased your entire disk instead of just the startup volume on that disk, macOS Recovery might offer only the macOS that came with your Mac, or the closest version still available. You can upgrade to a later version afterward.
- If your Mac has the Apple T2 Security Chip and you never installed a macOS update, Option-Command-R installs the latest macOS that was installed on your Mac.
- If you just had your Mac logic board replaced during a repair, macOS Recovery might offer only the latest macOS that is compatible with your Mac.
If you can't get macOS Recovery to offer the installer you want, you might be able to use one of the other ways to install macOS.
Other ways to install macOS
- You can also install macOS from the App Store or Software Update preferences. If you can't install macOS Catalina, you might be able to install an earlier macOS, such as macOS Mojave, High Sierra, Sierra, El Capitan, or Yosemite.
- Or create a bootable installer disk, then use that disk to install macOS on your Mac or another Mac.