Install Xcode Command Line Tools From Terminal

  

If you perform a fresh install of Xcode, you will also need to add the commandline tools by running xcode-select-install on the terminal. While OS X comes with a large number of Unix utilities, those familiar with Linux systems will notice one key component missing: a package manager. Xcode command line utils: Run xcode-select -install in your terminal. Alternatively the terminal seems to prompt the user to download the xcode command line utils after you try to execute a command such as git. Zsh config: Looks like the default shell is zsh in MacOS Big Sur. I installed ohmyzsh normally using curl and it worked fine. Mar 07, 2018 A quick side note; Homebrew is not the only way to install command line software, you can install command line tools on a Mac yourself and then compile and make software independently. For example, we discuss installing wget on Mac OS without Homebrew here and it uses the typical configure and make process.

  1. Mar 07, 2018 A quick side note; Homebrew is not the only way to install command line software, you can install command line tools on a Mac yourself and then compile and make software independently. For example, we discuss installing wget on Mac OS without Homebrew here and it uses the typical configure and make process. There’s nothing wrong with that approach (and arguably it might be.
  2. 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.

I'm consistently getting a failure at the point of installing xcode and the xcode CLTs: Installing Command Line Tools (macOS Sierra version 10.12) for Xcode Error.

Install Xcode Command Line Tools From Terminal

by Daniel Kehoe

Command

Last updated 7 December 2016

How to install Apple Xcode Command Line Tools for macOS Sierra. Complete guide to installation.

Installing Command Line Tools Macos Sierra Version 10.12 For Xcode Download

Xcode is a large suite of software development tools and libraries from Apple. The Xcode Command Line Tools are part of XCode. Installation of many common Unix-based tools requires the GCC compiler. The Xcode Command Line Tools include a GCC compiler. This article shows how to install Xcode Command Line Tools to use the GCC compiler and more.

Installing Ruby on Rails

If you are setting up your computer for developing web applications with Ruby on Rails, see this article for complete instructions:

Summary

  1. Step 1. Upgrade Your System to macOS Sierra
  2. Step 2. Open the Terminal Application
  3. Step 3. Is XCode Already Installed?
  4. Step 4. Enter Commands
  5. Step 5. Install XCode Command Line Tools
  6. Step 6. Verify Installation

MacOS Sierra

To install the newest Xcode Command Line Tools, you’ll need the latest version of macOS. If you’ve owned your Mac for several years and haven’t updated macOS, be prepared to spend several hours updating the operating system.

See Apple’s instructions How to upgrade to macOS Sierra. You can install macOS 10.12 Sierra from the Mac App Store for free. Allow plenty of time for the download and installation (it may take several hours).

If You Updated to macOS Sierra

If you updated to macOS Sierra from an earlier version of macOS, and you previously installed Xcode Command Line Tools, you will need to install the new version of Xcode Command Line Tools as described here.

If you previously installed the full Xcode package, you will need to update Xcode to the newest version (Xcode 8 or newer). After updating Xcode, launch and run the Xcode application and accept the Apple license terms.

Terminal Application

The Terminal application or console gives us access to the Unix command line, or shell. We call the command line the shell because it is the outer layer of the operating system’s internal mechanisms (which we call the kernel).

Find the macOS Terminal application by using the Command-Spacebar combination and searching for “Terminal.” It’s in the Applications/Utilities/ folder.

Try out the terminal application by entering a shell command:

Don’t type the $ character. The $ character is a cue that you should enter a shell command. This is a longtime convention that indicates you should enter a command in the terminal application. The Unix shell command whoami returns your username.

To learn more about Unix shell commands, read The Command Line Crash Course.

Is Xcode Already Installed?

You don’t need the full Xcode package to get the Xcode Command Line Tools. You only need the full Xcode package if you are doing development of applications for the Apple operating systems. However, you may have previously installed the full Xcode package.

Check if the full Xcode package is already installed:

If you see:

the full Xcode package is already installed.

You will need to update Xcode to the newest version (Xcode 8 or newer). Go to the App Store application and check “Updates.” After updating Xcode, be sure to launch the Xcode application and accept the Apple license terms.

If you intend to install Ruby using RVM, and you see a file location that contains spaces in the path:

you must delete Xcode. RVM cannot accommodate spaces in a path so RVM will fail when you attempt to install Ruby. You can either install only the Xcode Command Line Tools (instructions below) or reinstall the full Xcode package.

Install Xcode Command Line Tools

MacOS Sierra will alert you when you enter a command in the terminal that requires Xcode Command Line Tools. For example, you can enter gcc or make.

Try it. Enter:

You’ll see an alert box:

Alternatively, you can use a command to install Xcode Command Line Tools. It will produce a similar alert box. Note the double hyphen:

Installing Command Line Tools Macos Sierra Version 10.12 For Xcode 10

Click “Install” to download and install Xcode Command Line Tools.

The instructions in the alert box are confusing. You don’t need to 'Get Xcode' from the App Store. Just click 'Install' for the Xcode Command Line Tools. If you have a slow Internet connection, it may take many minutes.

If the download takes a very long time (over an hour) or fails, you can try an alternative. Go to https://developer.apple.com/downloads/more and enter your Apple ID and password. You'll be asked to agree to the terms of the Apple Developer Program. You'll see a list of software packages you can download. Look for the latest version of Command Line Toolsand click to download the .dmg file. Downloading the .dmg file is much faster than waiting forthe command-line-based download. Install the .dmg file by clicking on the package icon.

Verify that you’ve successfully installed Xcode Command Line Tools:

Just to be certain, verify that gcc is installed:

On earlier versions of macOS, it was more difficult to install Xcode Command Line Tools. It required a huge download of the full Xcode package from the Mac App Store or registration as an Apple developer for a smaller Command Line Tools package. Mac OS X Mavericks made installation of Xcode Command Line Tools much simpler.

Alternatives

The OSXGCC Installer is an open source project to provide the GCC compiler and related tools. In a recent blog post, Xcode, GCC, and Homebrew, the project maintainer recommends installing the Xcode Command Line Tools because the open source project is unable to duplicate the complete Apple package (notably, the Node software project isn’t supported).

Start Coding!

With the GCC compiler installed, you can install any Unix system tools you need for software development.

To install Rails, see the article Install Ruby on Rails – macOS.

Want to learn Ruby on Rails? See What is Ruby on Rails?, the book Learn Ruby on Rails, and recommendations for a Rails tutorial.

Credits

Daniel Kehoe wrote the article.

Archiware P5 Archive can create previews/proxies of your archived media - viewable when browsing the index of archived files. This provides great 'mini-MAM' functionality since it allows a visual view of a folder of files that has been archived and is no longer on-line. Being able to see what an image/video file looks like before restoring can help avoid restoring the wrong file(s). In this article, we'll learn how to install two tools required for generating these previews.

In order to create previews of image and video files, P5 uses two open source tools:

In this article, we'll learn how to use Homebrew, a popular package manager for macOS, to install both of these tools on a Mac.

Homebrew is a mature and respected tool and is easy to install (and uninstall if you change your mind). However, you'll need to know your way around the Mac Terminal to install Homebrew. In addition, further setup of P5 Archive to generate previews using these two tools requires the writing of a small shell script. This task requires moderate technical skills to complete. If you're not familiar and comfortable running a few commands in the Mac Terminal, stop now!

Visit the Homebrew webpage (https://brew.sh) and under the 'install' heading, you'll see some code to copy/paste into your Terminal window. You can do this as a regular user, root isn't required. Below is what we saw at the time of writing. Use the code copied from the Brew site though - it may change over time.

You will see many more notices fly by - keep watching. On systems where it's not already installed, you may be prompted to allow 'The Xcode Command Line Tools' to be installed. This will require you to type your password.

After this, more information will fly past and after a while - it can take a couple of minutes - and when you get your Terminal prompt back, it's finished. Ours looked like this:

Installing Command Line Tools Mac Os Sierra Version 10.12 For Xcode Download

Congratulations! Do as suggested and view the help, or skip to the next section below.

Now that Brew is installed on your system, to install ImageMagick, simply type 'brew install imagemagick'. When your prompt returns in the Terminal, ImageMagick is installed.

Again, what you see above is just a few lines, you'll a lot more happening before the installation completes. Once you've installed ImageMagick, you can invoke the tool and see it's help page by typing 'convert' in your Terminal. Convert is the name of the ImageMagick tool that you've just installed.

You've guessed it - to install FFmpeg type 'brew install ffmpeg'.

Wait for this to complete and you're done. To see the help page for FFmpeg, type 'ffmpeg' into your Terminal.

Now that both tools are installed on your system, P5 Archive can be configured to call these tools as required to generate previews for your archive workflow.

Installing Command Line Tools Macos Sierra Version 10.12 For Xcode Version

Having installed these tools, refer to the P5 documentation and articles on the Archiware Knowledgebase to learn how to configure previews within the Archive product.

Mas is only able to install/update applications that are listed in the Mac App Store itself. Use softwareupdate(8) utility for downloading system updates (like iTunes, Xcode Command Line Tools, etc) To install all pending updates run mas upgrade. ## Install DevToolsIf you have `pub` on your path, you can run:```pub global activate devtools```If you have `flutter` on your path, you can run:```flutter pub global activate devtools```That command installs (or updates) DevTools on your machine.## Launch the DevTools application serverNext, run the local web server, which serves the DevToolsapplication. Terminal is a sandboxed command line environment for iOS that has over 30 commands currently available, covering many of the most used command line tools and commands you know and love, like cat, grep, curl, gzip and tar, ln, ls, cd, cp, mv, rm, wc, and more, all available right on your iPhone or iPad.

Install Git on Mac OS X

There are several ways to install Git on a Mac. In fact, if you've installed XCode (or it's Command Line Tools), Git may already be installed. To find out, open a terminal and enter git --version.

Apple actually maintain and ship their own fork of Git, but it tends to lag behind mainstream Git by several major versions. You may want to install a newer version of Git using one of the methods below:

Git for Mac Installer

The easiest way to install Git on a Mac is via the stand-alone installer:

  1. Download the latest Git for Mac installer.

  2. Follow the prompts to install Git.

  3. Open a terminal and verify the installation was successful by typing git --version:

  4. Configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create:

  5. (Optional) To make Git remember your username and password when working with HTTPS repositories, configure the git-credential-osxkeychain helper.

Install Git with Homebrew

If you have installed Homebrew to manage packages on OS X, you can follow these instructions to install Git:

  1. Open your terminal and install Git using Homebrew:

  2. Verify the installation was successful by typing which git --version:

  3. Configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create:

  4. (Optional) To make Git remember your username and password when working with HTTPS repositories, install the git-credential-osxkeychain helper.

Install Git with MacPorts

If you have installed MacPorts to manage packages on OS X, you can follow these instructions to install Git:

  1. Open your terminal and update MacPorts:

  2. Search for the latest available Git ports and variants:

  3. Install Git with bash completion, the OS X keychain helper, and the docs:

  4. Configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create:

  5. (Optional) To make Git remember your username and password when working with HTTPS repositories, configure the git-credential-osxkeychain helper.

Install the git-credential-osxkeychain helper

Bitbucket supports pushing and pulling your Git repositories over both SSH and HTTPS. To work with a private repository over HTTPS, you must supply a username and password each time you push or pull. The git-credential-osxkeychain helper allows you to cache your username and password in the OSX keychain, so you don't have to retype it each time.

  1. If you followed the MacPorts or Homebrew instructions above, the helper should already be installed. Otherwise you'll need to download and install it. Open a terminal window and check:

    If you receive a usage statement, skip to step 4. If the helper is not installed, go to step 2.

  2. Use curl to download git-credential-osxkeychain (or download it via your browser) and move it to /usr/local/bin:

  3. Make the file an executable:

  4. Configure git to use the osxkeychain credential helper.

    The next time Git prompts you for a username and password, it will cache them in your keychain for future use.

Install Git with Atlassian Sourcetree

Sourcetree, a free visual Git client for Mac, comes with its own bundled version of Git. You can download Sourcetree here.

To learn how to use Git with Sourcetree (and how to host your Git repositories on Bitbucket) you can follow our comprehensive Git tutorial with Bitbucket and Sourcetree.

Build Git from source on OS X

Building Git can be a little tricky on Mac due to certain libraries moving around between OS X releases. On El Capitan (OS X 10.11), follow these instructions to build Git:

  1. From your terminal install XCode's Command Line Tools (if you haven't already):

  2. Install Homebrew.

  3. Using Homebrew, install openssl:

  4. Clone the Git source (or if you don't yet have a version of Git installed, download and extract it):

  5. To build Git run make with the following flags:

Install Git on Windows

Git for Windows stand-alone installer

  1. Download the latest Git for Windows installer.

  2. When you've successfully started the installer, you should see the Git Setup wizard screen. Follow the Next and Finish prompts to complete the installation. The default options are pretty sensible for most users.

  3. Open a Command Prompt (or Git Bash if during installation you elected not to use Git from the Windows Command Prompt).

  4. Run the following commands to configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create:

  5. Optional: Install the Git credential helper on Windows

    Bitbucket supports pushing and pulling over HTTP to your remote Git repositories on Bitbucket. Every time you interact with the remote repository, you must supply a username/password combination. You can store these credentials, instead of supplying the combination every time, with the Git Credential Manager for Windows.

Install Git with Atlassian Sourcetree

Sourcetree, a free visual Git client for Windows, comes with its own bundled version of Git. You can download Sourcetree here.

To learn how to use Git with Sourcetree (and how to host your Git repositories on Bitbucket) you can follow our comprehensive Git tutorial with Bitbucket and Sourcetree.

Install Xcode Command Line Tools From Terminal Command

Install Git on Linux

Debian / Ubuntu (apt-get)

Git packages are available via apt:

  1. From your shell, install Git using apt-get:

  2. Verify the installation was successful by typing git --version:

  3. Configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create:

Fedora (dnf/yum)

Git packages are available via both yum and dnf:

  1. From your shell, install Git using dnf (or yum, on older versions of Fedora):

    or

  2. Verify the installation was successful by typing git --version:

  3. Configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create

Build Git from source on Linux

Install Xcode Command Line Tools Terminal Mojave

Debian / Ubuntu

Git requires the several dependencies to build on Linux. These are available via apt:

  1. From your shell, install the necessary dependencies using apt-get:

  2. Clone the Git source (or if you don't yet have a version of Git installed, download and extract it):

  3. To build Git and install it under /usr, run make:

Fedora

Git requires the several dependencies to build on Linux. These are available via both yum and dnf:

  1. From your shell, install the necessary build dependencies using dnf (or yum, on older versions of Fedora):

    or using yum. For yum, you may need to install the Extra Packages for Enterprise Linux (EPEL) repository first:

  2. Symlink docbook2X to the filename that the Git build expects:

  3. Clone the Git source (or if you don't yet have a version of Git installed, download and extract it):

  4. To build Git and install it under /usr, run make:

Next up:

Setting up a repository

Start next tutorial

Install DevTools

If you have pub on your path, you can run:

Install Xcode Command Line Tools From Terminal 7

If you have flutter on your path, you can run:

Install xcode command line tools from terminal 2

That command installs (or updates) DevTools on your machine.

Launch the DevTools application server

Next, run the local web server, which serves the DevToolsapplication itself. To do that, run one of the followingtwo commands:

OR

On the command line, you should see output that looks something like:

Start an application to debug

Next, start an app to connect to. This can be either a Flutter applicationor a Dart command-line application. The command below uses a Flutter app:

ToolsInstall xcode command line tools from terminal 7

You need to have a device connected, or a simulator open, forflutter run to work. Once the app starts, you’ll see amessage in your terminal that looks like:

Keep note this URL, as you will use it to connect your app toDevTools.

Open DevTools and connect to the target app

Install Xcode Command Line Tools Big Sur Terminal

Once it’s set up, using DevTools is as simple as opening aChrome browser window and navigating to http://localhost:9100.

Install Xcode Command Line Tools From Terminal

Install Xcode Command Line Tools Terminal Catalina

Once DevTools opens, you should see a connect dialog:

Paste the URL you got from running your app (in this example,http://127.0.0.1:50976/Swm0bjIe0ks=/) into the connect dialogto connect your app to DevTools.

Install Xcode Command Line Tools From Terminals

Macos Install Xcode Command Line Tools Terminal

This URL contains a security token, so it will be differentfor each run of your app. This means that if you stop yourapplication and re-run it, you need to connect to DevToolswith the new URL.