How To Set Up A New Mac From Scratch

The following is a guide I wrote to guide one through a fresh installation on a new machine. Enjoy!

This is also available on Github.

Quote time:

“To be in hell is to drift; to be in heaven is to steer.”

― George Bernard Shaw



Last Tested on

MacOS 12.5.1

App Store Applications

Third Party Applications

Homebrew Cask Applications

  • 1password
  • alfred
  • appcleaner
  • bartender
  • blender
  • discord
  • dropbox
  • eloston-chromium
  • figma
  • firefox-developer-edition
  • font-hack
  • font-hack-nerd-font
  • iconjar
  • imageoptim
  • iina
  • insomnia
  • iterm2
  • kodi
  • google-drive
  • little-snitch
  • qlcolorcode
  • qlmarkdown
  • qlprettypatch
  • qlstephen
  • querious
  • quicklook-csv
  • quicklook-json
  • robo-3t
  • slack
  • sublime-text
  • suspicious-package
  • the-unarchiver
  • transmit
  • virtualbox
  • webpquicklook



.zshrc (primary)


.skhdrc (primary)

firefox new tab loading page

Sublime Text Preferences

cmus Theme

Neofetch Settings


# zsh
ln -s ~/Git/zshrc/.zshrc ~/.zshrc
# skhdrc
ln -s ~/Git/skhdrc/.skhdrc ~/.skhdrc
# yabairc
ln -s ~/Git/yabairc/.yabairc ~/.yabairc
# vimrc
ln -s ~/Git/vimrc/vimrc ~/.vimrc
# gitconfig
ln -s ~/Git/gitconfig/.gitconfig ~/.gitconfig


Fonts are Backed up to Dropbox/Resources/


# sudo apt-get install zsh
brew install zsh
sh -c "$(c
* DaisyDiskurl -fsSL"

# Make Default Shell
chsh -s $(which zsh)

# Install Oh-My-zsh
sh -c "$(curl -fsSL"

# Install Oh My ZSH Plugins
curl -L \
-o ~/.iterm2_shell_integration.zsh

git clone ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

Sublime Text 3 Plugin Installer

Just hit Command + Shift + P then hit install Package Control and we’re set to install plugins again.

Sublime Text Plugins

Plugins to install via Package Control:

  • A File Icon
  • Alignment
  • All Autocomplete
  • ApacheConf
  • AutoFileName
  • AutoSetSyntax
  • Babel
  • Better JavaScript
  • BracketHighlighter
  • Color Highlighter
  • DotENV
  • EditorConfig
  • Ethereum
  • GitGutter
  • GitOpenChangedFiles
  • HTML-CSS-JS Prettify
  • ImagePreview
  • IntelliDocs
  • JsPrettier
  • Liquid
  • LSP
  • LSP-css
  • LSP-eslint
  • LSP-html
  • LSP-intelephense
  • LSP-pylsp
  • LSP-stylelint
  • LSP-typescript
  • Monokai - Spacegray
  • Monokai Extended
  • nginx
  • Pane Pane
  • rsub
  • Sass
  • SassBeautify
  • SidebarEnhancement
  • SublimeLinter
  • SublimeLinter-eslint
  • SublimeLinter-jshint
  • SublimeLinter-php
  • Tagify
  • Theme - Spacegray
  • Theme - Monokai Pro
  • TypeScript Syntax
  • zzz A File Icon zzz

Sublime Text Themes

Theme: Monokai Pro UI Color Scheme: Monokai Pro

Previously: Spacegray Eighties

iTerm Colors

Set Up SSH Keys

# check if installed
ls -al ~/.ssh

# Actually generate it
ssh-keygen -t rsa -C ""

# Copy
keys # shortcut
pbcopy < ~/.ssh/

# Test if worked
ssh -T

Set Up Git

git config --global "Name"
git config --global
git config --global github.user user_name_here
git config --global github.token your_token_here
git config -l --global
git config --global core.editor "subl ."
git config --global color.ui true

Set Hostname

sudo scutil --set HostName ###

Set Up Mac OS X Preferences

# Set a fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 0

# Set a shorter delay until key repeat
defaults write NSGlobalDomain InitialKeyRepeat -int 12

# Remove Animations
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001

# Hide the Desktop
defaults write CreateDesktop false; killall Finder

# Skip Verify Images
defaults write skip-verify true

# Prevent Apple Character Press and Hold
defaults write -g ApplePressAndHoldEnabled -bool false

# Add a contextual menu item to show the Web Inspector in web views
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true

# Show the ~/Library folder
chflags nohidden ~/Library

# Store screenshots in subfolder on desktop
mkdir ~/Screenshots
defaults write location ~/Screenshots
killall SystemUIServer

# Add Message to Login Screen
sudo defaults write /Library/Preferences/ LoginwindowText "In found, please call ###-###-####"

# Make Sublime Default Text Editor
defaults write LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}'

# Enable Text Selection in QuickLook
defaults write QLEnableTextSelection -bool TRUE; killall Finder

# Faster Dock Animation
defaults write autohide-time-modifier -float 0.15; killall Dock

# Dull Hidden Apps in Dock
defaults write showhidden -bool TRUE; killall Dock

# Disable Dashboard
defaults write mcx-disabled -bool true

# Make Dock only Show Active Apps
defaults write static-only -bool true; killall Dock

# Recents & Favorites in Dock (Favorite Items & Recent Docs)
defaults write persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }'; killall Dock
defaults write persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }'; killall Dock

# Just in Case: Revert Dock to Default
defaults write static-only -bool false; killall Dock

Install Xcode

xcode-select --install

Install Homebrew

ruby -e "$(curl -fsSL"

brew doctor

# Install Cask Fonts
brew tap homebrew/cask-cask-fonts

Install Python 3

brew install python3
# python3 for python3 command line

# Common Programs
brew install ack autojump automake bash-completion bat colordiff cmus cmusfm curl exa fd ffmpeg gifsicle git google-drive httpie icoutils imagemagick itermocil jq libmemcached libxml2 memcached neofetch openssl ossp-uuid qt readline ripgrep terminal-notifier wget wp-cli yabai yarn youtube-dl z

Install Latest PHP from Homebrew

brew update && brew upgrade
brew untap homebrew/php
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew install php
brew cleanup
brew doctor

export PATH=$(brew — prefix homebrew/php/php8X)/bin:$PATH

Just remember to change the X in the PHP version in the last export line to whatever the latest one you’re using is.

Install Apps Via Homebrew Cask

# Install Fonts
brew tap homebrew/cask-fonts
brew install font-hack-nerd-font

# iTermocil
brew install TomAnthony/brews/itermocil

# Yabai
brew install koekeishiya/formulae/yabai

# shkd
brew install koekeishiya/formulae/skhd

# Shopify
brew tap shopify/shopify

# Cask Applications
brew install 1password alfred arduino bartender blender bpytop discord dropbox eloston-chromium figma firefox-developer-edition font-hack-nerd-font iterm2 imageoptim iina insomnia lastfm little-snitch mimestream querious robo-3t slack sublime-text sublime-merge the-unarchiver

# Install Quick Look Plugins (preview code etc)
brew install qlcolorcode qlstephen qlmarkdown quicklook-json qlimagesize suspicious-package apparency quicklookase qlvideo

Install Docker

brew cask alfred link

Install MySQL

# Install
brew install mysql

# Check & Start
mysql.server start

# If Installation Failed
brew remove mysql
brew cleanup
sudo rm -rf /usr/local/var/mysql/
brew install mysql
mysql.server start

# Check MySQL Info
brew info mysql

Install MongoDB

brew install mongodb

NPM Stuff

# Install NPM Packages
npm install -g eslint eslint-cli eslint-plugin-prettier gatsby-cli grunt-cli gulp-cli is-up-cli prettier surge fkill-cli json typescript typescript-language-server

Install Yabai

Install Yabai Window Manager

First disable SIP:

csrutil disable

then after reboot:

brew install koekeishiya/formulae/yabai

sudo yabai --install-sa

brew services start yabai

killall Dock

Marko Bajlovic

Sourced from all over and throughout the years.