Skip to content

Instantly share code, notes, and snippets.

@pjobson
Last active September 11, 2020 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pjobson/e34d6c7f1628fd4383841502fc3c41f3 to your computer and use it in GitHub Desktop.
Save pjobson/e34d6c7f1628fd4383841502fc3c41f3 to your computer and use it in GitHub Desktop.
Clean Install macOS Command Line Tools (CLI)

Homebrew

Homebrew on fresh macOS install.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Bash

Do with care, this installs and sets your shell to bash 5.x instead of the default 3.x.

brew install bash
echo "/usr/local/bin/bash" | sudo tee -a /etc/shells
chsh -s /usr/local/bin/bash

# bash completion
brew install bash-completion@2
echo '[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"' >> ~/.bash_profile

# better PS1
echo 'export PS1="\[\e[32m\][\[\e[m\]\[\e[31m\]\u\[\e[m\]\[\e[33m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\]:\[\e[36m\]\w\[\e[m\]\[\e[32m\]] \\$\[\e[m\] "' >> ~/.bash_profile

Programs

Video

brew install ffmpeg youtube-dl

Tools for Fools

# GNU
brew install gnu-sed gnu-which gnu-tar 
echo 'export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"' >> ~/.bash_profile
echo 'export PATH="/usr/local/opt/gnu-which/libexec/gnubin:$PATH"' >> ~/.bash_profile
echo 'export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.bash_profile

# binutils
brew install binutils
echo 'export PATH="/usr/local/opt/binutils/bin:$PATH"' >> ~/.bash_profile

# coreutils
brew install coreutils
echo 'export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"' >> ~/.bash_profile
echo "alias ls='ls --color --group-directories-first'"  >> ~/.bash_profile
echo "alias l='ls -lah'"  >> ~/.bash_profile

# rename
brew install rename

# htop
brew install htop
echo 'alias top=htop' >> ~/.bash_profile

# neofetch
brew install neofetch
echo 'neofetch' >> ~/.bash_profile

# ffmpeg
brew install ffmpeg

# youtube-dl
brew install youtube-dl

# wget & latest curl
brew install wget curl
echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> ~/.bash_profile

# Imagemagick
brew install imagemagick

# Tree
brew install tree

# git
brew install git

# vim
brew install vim
echo 'alias vi="vim"' >> ~/.bash_profile

# Source your .profile
source ~/.bash_profile

Node.js

curl -L https://git.io/n-install | bash
echo 'export PATH=~/n/bin:$PATH' >> ~/.bash_profile
source ~/.bash_profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment