Where to store code and install applications on Mac OS X - switch from Windows

Here are a few newcomers from those who spent 15 years coding on Windows but starting from scratch on Mac OS X. I searched the Internet and this site and did not find the answers, but I think the answers will be useful to many people.

Very simple....

  • Where should I store private code and projects in the file system? My user directory? In / usr /?

  • Where should I store shared code and projects?

  • Where should I create a github repository?

  • after assembly, where should I install the applications? Here I see many opportunities. / opt /, / var / lib, / usr / local / var, etc.

  • perhaps the most interesting: how can I get a simple run of the location of everything that was installed on my Mac?

I would suggest that over 40 years of UNIX history, standards have appeared for them, but so far I have not been able to find them. There should be some โ€œbest practiceโ€ recommendations that I must follow.

Oh, by the way, I'm talking about things like PostgreSQL, etc. Invalid Mac apps.

The reason I'm asking is because I came across various ways to install things that seem to have their own ideas on where to install the same application. e.g. homebrew, ant etc. They sometimes lead to different installation locations than in accordance with the FAQ or documentation for manual installation of the application.

Rate any answers to them.

Many thanks.

+7
source share
1 answer

Github has a very nice Mac app that can download and sync your Github repositories. By default, it places them in subdirectories in ~ / Documents (the document directory of your home folder).

My home setup is to create a git directory inside ~ and use it only for private projects. For shared projects, put them in / Users / Shared (there is a shared folder on Mac OS for everyone there)

In terms of installing command line tools, Macs are like BSD boxes. Install in / usr / local / bin, etc. Graphic applications must go into / Applications. The Github mac application installs the command line tool (optional) in / usr / local / bin.

Some package tools in OS X create their own directory hierarchy (fink, macports), but mirports installs in / usr / local.

+4
source

All Articles