This is something really simple, but I can’t seem to find the answer anywhere, and I’m new to both Mac and UNIX, which doesn’t help.
I’ve installed Xcode on my mac, along with the iPhone SDK 3.2. I’m trying to run Xcode command utilities that came 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. Here is what I do.
- I launch the Terminal application
- I want to run ‘xcrun’, so I just type ‘xcrun’
- I get an error saying ‘-bash: xcrun: command not found’
- I have xcrun installed under /Developer/usr/bin
Is there some sort of PATHS environment variable that I need to permanently update? Or perhaps Xcode comes with its own Terminal application with those new paths already baked in? Finally, what’s the difference between sh and bash?
Thanks for the help!
I’m using Snow Leopard + Xcode, and
xcodebuildandxcrunare both present at/usr/bin. Regardless, they should be present at/Developer/usr/bin— you just have to make sure that path is in your$PATHvariable. You can set it in your shell configuration file (~/.bashrcforbash) like so:As for the difference between
shandbash,bashsupports some extensions and other features not found in the more primitivesh; however, on Mac OS X,shandbashare the same program (this is typical on many Unix and Linux systems nowadays). However, whenbashis invoked assh(that is, you call/bin/shfrom the command line, rather than/bin/bash),bashwill try to act like the more “traditional”shprogram.