Launch Xcode tools from a terminal window

This is something really simple, but I can't find the answer anywhere, and I'm new to Mac and UNIX, which doesn't help.

I installed Xcode on my Mac along with the iPhone SDK 3.2. I am trying to run the Xcode command line utilities that come with the SDK from the unix terminal, but I donโ€™t know how to update the paths so that the system knows where to find them. That's what I'm doing.

  • I am running a terminal application
  • I want to run "xcrun", so just type "xcrun"
  • I get the error '- bash: xcrun: command not found'
  • I have xcrun installed in / Developer / usr / bin

Is there some kind of PATHS environment variable that I need to keep updating? Or maybe Xcode comes with its own Terminal app with those new paths that have already been baked? Finally, what's the difference between sh and bash?

Thanks for the help!

+4
source share
1 answer

I am using Snow Leopard + Xcode, and xcodebuild and xcrun are present in /usr/bin . Regardless, they should be present in /Developer/usr/bin - you just need to make sure the path is in your $PATH variable. You can install it in your shell configuration file ( ~/.bashrc for bash ) as follows:

 export PATH="/Developer/usr/bin:${PATH}" 

Regarding the difference between sh and bash , bash supports some extensions and other functions not found in the more primitive sh ; however, on Mac OS X, sh and bash are the same program (this is typical of many Unix and Linux systems at present). However, when bash is invoked as sh (that is, you invoke /bin/sh from the command line and not /bin/bash ), bash will try to act as a more "traditional" sh program.

+4
source

All Articles