[精讚] [會員登入]

how to use linux command on mac os

make linux common commands executable on mac os by installing gnu-tools

分享完整連結 //n.sfs.tw/m10531

分享連結 how to use linux command on mac os@精讚
(文章歡迎轉載,請尊重版權註明連結來源)
2018-12-19 13:14:11 By jung

Install Homebrew

First, visit Homebrew homepage and follow the installation instructions to install Homebrew.

Shortcut: install the latest XCode and then run the following command to install:

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

Then add the following line to your .bashrc or .zshrc:

export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH"

Install the GNU Command Line Tools

(All the brew install commands below have been put into one script on GitHub for downloads.)
First comes the most important one — GNU Coreutils:

brew install coreutils

GNU Coreutils contains the most essential UNIX commands, such as ls, cat.

Then you may probably want to install the following ones (For some of the packages, you need to run brew tap homebrew/dupes first, but only once for your system):

brew install binutils
brew install diffutils
brew install ed --with-default-names
brew install findutils --with-default-names
brew install gawk
brew install gnu-indent --with-default-names
brew install gnu-sed --with-default-names
brew install gnu-tar --with-default-names
brew install gnu-which --with-default-names
brew install gnutls
brew install grep --with-default-names
brew install gzip
brew install screen
brew install watch
brew install wdiff --with-gettext
brew install wget

The --default-names option will prevent Homebrew from prepending a g to each of the newly installed commands, thus we could use these commands as default commands over the ones shipped by OS X.

相關連結

https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/

END
你可能有興趣

How To Secure Apache with Let's Encrypt on Debian 8

This tutorial will show you how to set up a TLS/SSL certificate from Let's Encrypt on a Debian 8 server running Apache as a web server.

[問卦] 建中天才,台大醫科,然後呢?

我覺得只要可以養活自己 & 不造成其他人麻煩 & 做的事情對別人是有益的, 喜歡什麼,就去做什麼吧

設定Windows Server 2016的時間同步

Windows Server 2016的時間同步機制