Mac/GNU: Difference between revisions
< Mac
(Created page with " Install and Use GNU Command Line Tools on macOS/OS X - Top Bug Net https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/") |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Install and Use GNU Command Line Tools on macOS/OS X - Top Bug Net | Install and Use GNU Command Line Tools on macOS/OS X - Top Bug Net | ||
https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ | https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ | ||
https://gist.github.com/xuhdev/8b1b16fb802f6870729038ce3789568f | |||
== Updated homebrew-install-gnu.sh == | |||
<pre> | |||
# homebrew-install-gnu.sh | |||
# see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ | |||
# core | |||
brew install coreutils | |||
# key commands | |||
brew install binutils | |||
brew install diffutils | |||
brew install ed | |||
brew install findutils | |||
brew install gawk | |||
brew install gnu-indent | |||
brew install gnu-sed | |||
brew install gnu-tar | |||
brew install gnu-which | |||
brew install gnutls | |||
brew install grep | |||
brew install gzip | |||
brew install screen | |||
brew install watch | |||
brew install wdiff | |||
brew install wget | |||
# OS X ships a GNU version, but too old | |||
brew install bash | |||
brew install emacs | |||
brew install gdb # gdb requires further actions to make it work. See `brew info gdb`. | |||
brew install gpatch | |||
brew install m4 | |||
brew install make | |||
brew install nano | |||
# Other commands (non-GNU) | |||
brew install file-formula | |||
brew install git | |||
brew install less | |||
brew install openssh | |||
### brew install perl518 # must run "brew tap homebrew/versions" first! --- deprecated! solution?? | |||
brew install python | |||
brew install rsync | |||
brew install svn | |||
brew install unzip | |||
brew install vim | |||
brew install macvim | |||
brew install zsh | |||
# Others I added | |||
brew install tree | |||
</pre> | |||
<pre> | |||
# echo 'export PATH="/usr/local/opt/coreutils/libexec/gnubin/:$PATH"' >> $HOME/.bash_profile | |||
echo 'export PATH="$(brew --prefix findutils)/libexec/gnubin:$PATH"' >> $HOME/.bash_profile | |||
echo 'export PATH="$(brew --prefix gawk)/libexec/gnubin:$PATH"' >> $HOME/.bash_profile | |||
echo 'export PATH="$(brew --prefix grep)/libexec/gnubin:$PATH"' >> $HOME/.bash_profile | |||
echo 'export PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"' >> $HOME/.bash_profile | |||
# apropos find | |||
# makewhatis: /usr/local/opt/coreutils/libexec/gnubin/man: Not a directory | |||
# makewhatis: /usr/local/opt/grep/libexec/gnubin/man: Not a directory | |||
# makewhatis: /usr/local/opt/gawk/libexec/gnubin/man: Not a directory | |||
# makewhatis: /usr/local/opt/findutils/libexec/gnubin/man: Not a directory | |||
# makewhatis: /usr/local/opt/coreutils/libexec/gnubin/MAN: Not a directory | |||
# ln -s /usr/local/opt/findutils/libexec/gnubin/find /usr/local/bin/find | |||
# ln -s /usr/local/opt/gawk/libexec/gnubin/awk /usr/local/bin/awk | |||
# ln -s /usr/local/opt/grep/libexec/gnubin/grep /usr/local/bin/grep | |||
# export PATH="$(brew --prefix findutils)/libexec/gnubin:$PATH" | |||
# echo 'export PATH="/usr/local/opt/??/bin:$PATH' >> /Users/[USERNAME]/.bash_profile | |||
# already in path:? | |||
# echo 'export PATH="/usr/local/bin:$PATH"' >> $HOME/.bash_profile | |||
</pre> | |||
== Original homebrew-install-gnu.sh == | |||
<pre> | |||
# see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ | |||
# core | |||
brew install coreutils | |||
# key commands | |||
brew install binutils | |||
brew install diffutils | |||
brew install ed --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 | |||
# OS X ships a GNU version, but too old | |||
brew install bash | |||
brew install emacs | |||
brew install gdb # gdb requires further actions to make it work. See `brew info gdb`. | |||
brew install gpatch | |||
brew install m4 | |||
brew install make | |||
brew install nano | |||
# Other commands (non-GNU) | |||
brew install file-formula | |||
brew install git | |||
brew install less | |||
brew install openssh | |||
brew install perl518 # must run "brew tap homebrew/versions" first! | |||
brew install python | |||
brew install rsync | |||
brew install svn | |||
brew install unzip | |||
brew install vim --override-system-vi | |||
brew install macvim --override-system-vim --custom-system-icons | |||
brew install zsh | |||
</pre> | |||
== keywords == |
Latest revision as of 14:38, 8 June 2025
Install and Use GNU Command Line Tools on macOS/OS X - Top Bug Net https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/
https://gist.github.com/xuhdev/8b1b16fb802f6870729038ce3789568f
Updated homebrew-install-gnu.sh
# homebrew-install-gnu.sh # see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ # core brew install coreutils # key commands brew install binutils brew install diffutils brew install ed brew install findutils brew install gawk brew install gnu-indent brew install gnu-sed brew install gnu-tar brew install gnu-which brew install gnutls brew install grep brew install gzip brew install screen brew install watch brew install wdiff brew install wget # OS X ships a GNU version, but too old brew install bash brew install emacs brew install gdb # gdb requires further actions to make it work. See `brew info gdb`. brew install gpatch brew install m4 brew install make brew install nano # Other commands (non-GNU) brew install file-formula brew install git brew install less brew install openssh ### brew install perl518 # must run "brew tap homebrew/versions" first! --- deprecated! solution?? brew install python brew install rsync brew install svn brew install unzip brew install vim brew install macvim brew install zsh # Others I added brew install tree
# echo 'export PATH="/usr/local/opt/coreutils/libexec/gnubin/:$PATH"' >> $HOME/.bash_profile echo 'export PATH="$(brew --prefix findutils)/libexec/gnubin:$PATH"' >> $HOME/.bash_profile echo 'export PATH="$(brew --prefix gawk)/libexec/gnubin:$PATH"' >> $HOME/.bash_profile echo 'export PATH="$(brew --prefix grep)/libexec/gnubin:$PATH"' >> $HOME/.bash_profile echo 'export PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"' >> $HOME/.bash_profile # apropos find # makewhatis: /usr/local/opt/coreutils/libexec/gnubin/man: Not a directory # makewhatis: /usr/local/opt/grep/libexec/gnubin/man: Not a directory # makewhatis: /usr/local/opt/gawk/libexec/gnubin/man: Not a directory # makewhatis: /usr/local/opt/findutils/libexec/gnubin/man: Not a directory # makewhatis: /usr/local/opt/coreutils/libexec/gnubin/MAN: Not a directory # ln -s /usr/local/opt/findutils/libexec/gnubin/find /usr/local/bin/find # ln -s /usr/local/opt/gawk/libexec/gnubin/awk /usr/local/bin/awk # ln -s /usr/local/opt/grep/libexec/gnubin/grep /usr/local/bin/grep # export PATH="$(brew --prefix findutils)/libexec/gnubin:$PATH" # echo 'export PATH="/usr/local/opt/??/bin:$PATH' >> /Users/[USERNAME]/.bash_profile # already in path:? # echo 'export PATH="/usr/local/bin:$PATH"' >> $HOME/.bash_profile
Original homebrew-install-gnu.sh
# see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ # core brew install coreutils # key commands brew install binutils brew install diffutils brew install ed --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 # OS X ships a GNU version, but too old brew install bash brew install emacs brew install gdb # gdb requires further actions to make it work. See `brew info gdb`. brew install gpatch brew install m4 brew install make brew install nano # Other commands (non-GNU) brew install file-formula brew install git brew install less brew install openssh brew install perl518 # must run "brew tap homebrew/versions" first! brew install python brew install rsync brew install svn brew install unzip brew install vim --override-system-vi brew install macvim --override-system-vim --custom-system-icons brew install zsh