Monday, January 27, 2014

Install GNU in Mac OS

If you don't know what's GNU, check here (http://www.gnu.org/gnu/gnu.html) and here (http://en.wikipedia.org/wiki/GNU).

Why Mac OS does not come with GNU? Here is what I extracted from Hong Xu's comment:
Because OS X is mainly BSD based -- the same reason why FreeBSD/OpenBSD/NetBSD does not use GNU tools by default. Another reason that Apple bundles many outdated GNU software (bash, gdb, etc.) is that the new GPLv3 doesn't allow Apple to do so, while GPLv2 is fine with this behavior. After many GNU projects upgraded to GPL v3, Apple won't be able to bundle them any more.
I found it's very easy to install GNU in Max OS just following Hong Xu's blog:
http://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/

Also recommend the friendly tool of Homebrew:
http://brew.sh/

Basically, here is step:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

brew install coreutils  # contain most of what you want
brew install binutils 
brew install diffutils 
brew install ed --default-names 
brew install findutils --default-names 
brew install gawk 
brew install gnu-indent --default-names 
brew install gnu-sed --default-names 
brew install gnu-tar --default-names 
brew install gnu-which --default-names 
brew install gnutls --default-names 
brew install grep --default-names 
brew install gzip 
brew install screen 
brew install watch 
brew install wdiff --with-gettext 
brew install wget

3 comments:

  1. You can also use MacPorts and Fink to install GNU tools....

    ReplyDelete
    Replies
    1. Thanks. I was using Fink for that purpose, but didn't know MacPorts. Good to know :)

      Delete
  2. There is a reason why I bought a Mac, it was not to be one of the cool kids that wanted the best of the best. No it was because of the music production I do on it. Hours and hours sitting in front of my Mac copying, pasting, moving, deleting, hour after hour just beating on my Mac in a endless assault to get my work done. That is the key part, my work. I work from home, it is great, but even if it is from home it is still work and it still needs to get done. So my Mac, I have it because it is fast, gets the job done and comes back for more.

    But what happens when it doesn't want to do those things anymore?

    I move around massive amounts of information and yes even on the almighty Mac this can cause a problem after a while. Things fragment, programs get corrupted issues come up. My light speed Mac slows down to a crawl and all of the sudden I simply can not get any work done. Because I work from home there is no IT guy to call and ask to come fix it. No instead I have to figure out what is wrong. I am lucky, I did, but not after trying everything under the sun first and wasting countless hours looking for one program that can do what I needed instead of ten programs. One program to lead them all….okay that was a lame Lord of the rings reference, but that program was/is Detox My Mac. A simple to use program that did not just fix my issues, it put my Mac on overdrive again. A few clicks and my Mac was clean and ready to rock and roll again.

    Read more here:- http://detox-my-mac.com?98274rwehf78t34

    ReplyDelete