Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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 am new to Mac OS command line, I want to use either of apt-get or yum.

Can anyone help me to install them and make them successful running?

share|improve this question
2  
Why do you want to install them? What software do you want to install that you expect to find as .deb or .rpm files which will work on an OS X install? – Michael Kjörling Jun 26 '13 at 11:08
    
Both utilities are too Linux-specific (and/or too Fedora/Debian-specific) so they won't work on OSX without serious effort on your part,so Michael's question stands: what exactly is it you want to do? – schaiba Jun 26 '13 at 11:30

If you want the equivalent to apt-get or yum on Mac OS X, you have two choices.

  1. Homebrew: http://brew.sh
  2. Macports: http://www.macports.org

You can use brew install PACKAGE_NAME or port install PACKAGE_NAME to install the package available.

share|improve this answer
    
There are guides on how to run Hombrew side-by-side with Macports or Fink, but it is generally recommended to choose one and stick with it. Homebrew is pretty much the standard these days. There is only a single instance I can recall personally, where a package I needed was available via Macports and not Homebrew, and that was an X11-based GUI browser -- Firefox, I believe, which would have been really nice to browse with over SSH in some specific localhost scenario I was working with at the time. It's just a personal preference thing, mostly. Homebrew is the best and most user-friendly, IMHO. – rubynorails Dec 12 '15 at 4:57

It is possible to use apt-get on OS X 10.9 like Deb based Linux using a third party software named Fink - How to Install apt-get on Mac OS X. However, unlike Homebrew and OS X Package Managers, Fink does not use /usr/local/ path to install software. It simply means, Fink is for a bit advanced users who can handle the software conflicts (for difference in version). Homebrew, to me is the best package manager...

share|improve this answer

You need to install either Homebrew or YUM. I recommend using HomeBrew. To install it enter the following command in terminal.

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 

then use brew install Package_name

share|improve this answer
1  
Does ruby come pre-installed with each OSX? – Anthon Apr 3 '15 at 14:07
    
@Anthon: Yes, for several years now. – cdunn2001 May 15 '15 at 8:23

Your Answer

 
discard

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.