Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 9 down vote accepted

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.

share|improve this answer
in linux terminal installing command does any thing automatically it downloads files and ... how about Homebrew? is it required to download files manually? – peaceman Jun 7 '12 at 11:08
I'm sorry, I don't understand your question. – macaco Jun 7 '12 at 15:24
@peaceman once you've set up Homebrew, it downloads all the dependencies and files you need for any package you install from its repository. It's a beautiful thing, really. – Ian C. Jun 7 '12 at 16:09
@CajunLuke for one MacPorts will install duplicates of everything it needs. Don't want another bzip2? Too bad, you're getting one. Brew on the other hand leverages the existing system. I have 23 packages I like to install. With Macports that balloons with dependancies to 144 packages. With Homebrew, only 44. That's what I call "overly complex". You should seriously try Homebrew. You'll like it better. – bahamat Jun 7 '12 at 22:43
Like I said, you should seriously try it. It's easier to manage, it's easier to use, it's easier to fix and it's easier to contribute. I'm not trying to win. Just see for yourself, then pick the one you prefer. – bahamat Jun 7 '12 at 22:59

Did you take a look at MacPorts?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.