Recover command line after upgrading Mac OS – Installing Command Line Tools (Lion & Mountain Lion)

I love Apple and use my MB Pro for everything, from my personal everyday: mail, calendars, Facebook, etc. However, each time a new version of Mac OS is released, the SO moves further and further from Unix, and therefore from “standards”.

One of the consequences of this -among others- is that the known in linux OS as /bin moves around, making our .bashrc (yes, we do have that in Mac OS too) useless every time we upgrade. Since trying to add to the $PATH all the different folders each upgrade moves around is extremely painful, here it is an useful tip to recover the system commands from the terminal (e.g. git, gcc, javac, etc). (Please note that your own scripts, commands and binaries will remain the same and totally accessible as log as they are part of your $PATH).

Continue reading