Difference between revisions of "OS X command line"

From Bashlinux
Jump to: navigation, search
(Created page with "As of 2018, some of the CLi tools, if not all, have not been updated to their current versions, some of them dating from more than 10 years ago. So, first thing first, install...")
 
(No difference)

Latest revision as of 21:12, 17 January 2018

As of 2018, some of the CLi tools, if not all, have not been updated to their current versions, some of them dating from more than 10 years ago. So, first thing first, install homebrew then proceed to install bash and anything else we might need.

Homebrew

How to install homebrew

  • Install XCode
xcode-select --install
  • Install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Update brew
brew update

Packages

How to setup bash

  • Install bash
brew install bash
  • Add bash to the list of shells
sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells'
  • Set bash as the default shell
chsh -s /usr/local/bin/bash
  • Exit the current terminal and start a new one

How to setup sed

  • Install sed replacing the current binary
brew install gnu-sed --default-names
  • Reload the terminal
hash -r