How can we know the default Installation Directory of XCode through command line?

DShah picture DShah · Nov 9, 2011 · Viewed 19.6k times · Source

Is there a way to know the Default Installation Directory of XCode through command line? (I know default is /Developer, but what if i changed it to /XCode42, then in this case how can i get path)

Also where is those environment variables are set and what are the names for those variables? (As in windows we are giving Path for Java)

Answer

joerick picture joerick · Nov 10, 2011

This will do

xcode-select --print-path