Skip to content

Instantly share code, notes, and snippets.

@jgamblin
Last active May 31, 2019 18:01
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgamblin/829ff42e16f3dfd5967434cf71448036 to your computer and use it in GitHub Desktop.
Save jgamblin/829ff42e16f3dfd5967434cf71448036 to your computer and use it in GitHub Desktop.
Configure Brew on MacOS and install utilities.
#!/bin/bash
#Check If Brew Is Installed
if ! [ -x "$(command -v brew)" ]; then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
brew update
brew upgrade
fi
# Install Core Utilities (Most Of MacOS Defaults Are Outdated).
brew install coreutils
brew install moreutils
brew install findutils
brew install gnu-sed --with-default-names
brew install grep
brew install openssh
brew install screen
brew install p7zip
brew install ssh-copy-id
brew install tree
# Install Some Security Tools
brew install binutils
brew install binwalk
brew install nmap
brew install sqlmap
brew install tcpflow
brew install tcpreplay
brew install tcptrace
# Clean Up Brew
brew cleanup
#Remove Icons For Hard Drives, Servers, And Removable Media On The Desktop.
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool false
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool false
defaults write com.apple.finder ShowMountedServersOnDesktop -bool false
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool false
#Keep folders At Top When Sorting By Name.
defaults write com.apple.finder _FXSortFoldersFirst -bool true
#Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
#Show the ~/Library and /Voluemes folder
chflags nohidden ~/Library
sudo chflags nohidden /Volumes
#Download and Install available updates in background
defaults write com.apple.SoftwareUpdate AutomaticDownload -int 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment