Is it possible to install Linux packages on OS X?

I know that the Mac commandline is very similar to that of Linux operating systems, so it would be nice to use some features of Linux in my Mac, specially installing Linux packages. For example, in Linux we can install a package by simply typing sudo apt-get install "package name" at the prompt. Is it possible to do something like this on Mac?


Solution 1:

Yes, it is possible to install and run a variety of UNIX applications on OS X. There are a few solutions out there, my choice and recommendation is Homebrew. I've found other solutions to be overly complex and unwieldy.

Solution 2:

Did you take a look at MacPorts?