Where should I install new (source code) software on a Mac? I am new to the Mac philosophy, but I have been using Ubuntu since a while. Now I am using Mac at work, and I have to install a few programs, not apps, from source code distribution.

I did try to gunzip a folder in /usr/local/ but it says permission denied. Same result with sudo. The su command just freezes.

Is /Users/ a better place to go? I suppose I do not need permission to write in there, right?

Where should I install new software (from source code distribution) on a Mac?
To start we should define a few terms. An install from source code means that the software needs to be built before it can be executed.

So your first step is to find a place on your computer to perform the build. The best place for this is a directory in your home directory. I use a directory at ~/src/ to hold the packages. So, create this folder and unpack your source into here. Then you can build the software here.

When it comes to the executable files man hier will tell you that /usr/local is the place to install things not included in the OS. Homebrew, for example, will install into here. So executables should go into /usr/local/bin. Most software packages will have an install tool that will perform this step. Of course /usr/local/bin needs to be in your PATH variable.

This is identical to Ubuntu in almost every respect.