Last Updated: 1/28/2022
The setup assistant will launch once you turn the computer on. Enter your language, time zone, Apple ID, and so on. The first thing you should do is update macOS to get the latest security updates and patches.
- Install apps via Homebrew
- Shell setup with zsh
- Set up Node via nvm
- Set up git config
- Set up SSH keys and config
- macOS settings
- Application settings
Install the Homebrew package manager. This will allow you to install almost any app from the command line.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Make sure everything is up to date.
Note: On the M1 install, there will be a few errors at the end, you'll have to run the commands to add to path, then run
brew doctorand run the commands listed.
Here are a few shell programs I always use:
Here are some the applications I always install (
cask flag in Homebrew):
Do not install Node.js through Homebrew. Use nvm (below).
|Visual Studio Code||text editor|
|Google Chrome||web browser|
## Shell Programs brew install \ git \ bat \ exa \ tldr \ fzf && # GUI programs brew install --cask \ visual-studio-code \ google-chrome \ firefox \ rectangle \ iterm2 \ docker \ discord \ slack \ spotify \ postgres \ postico \ bear \ todoist \
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
I add a few alises.
alias cat="bat" alias ls="exa"
Use Node Version Manager (nvm) to install Node.js. This allows you to easily switch between Node versions, which is essential.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
Install the latest version.
nvm install node
Restart terminal and run the final command.
nvm use node
Confirm that you are using the latest version of Node and npm.
node -v && npm -v
For later, here's how to update nvm.
nvm install node --reinstall-packages-from=node
Here's how to switch to another version and use it.
nvm install xx.xx
nvm use xx.xx
And to set the default:
nvm alias default xx.xx
The first thing you should do with Git is set your global configuration.
Input your config and create some aliases.
[user] name = Firstname Lastname email = firstname.lastname@example.org [github] user = username [alias] a = add ca = commit -a cam = commit -am cm = commit -m s = status p = push pom = push origin master puom = pull origin master cob = checkout -b co = checkout fp = fetch --prune --all l = log --oneline --decorate --graph lall = log --oneline --decorate --graph --all ls = log --oneline --decorate --graph --stat lt = log --graph --decorate --pretty=format:'%C(yellow)%h%Creset%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset'
With the above aliases, I can run
git s instead of
git status, for example. The less I have to type, the happier I am.
You can generate an SSH key to distribute.
ssh-keygen -t ed25519 -C "email@example.com"
eval "$(ssh-agent -s)"
ssh-add -K ~/.ssh/id_rsa
Simplify the process of SSHing into other boxes with your SSH config file. Create
~/.ssh/config if it does not already exist.
Add the following contents, changing the variables for any hosts that you connect to. Using the below will be the same as running
ssh -i ~/.ssh/key.pem firstname.lastname@example.org.
Host * AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/id_ed25519 Host myssh HostName example.com User user IdentityFile ~/.ssh/key.pem
Now just run the alias to connect.
I don't like a lot of the Apple defaults so here are the things I always change.
To get the Home folder in the finder, press
CMD + SHIFT + H and drag the home folder to the sidebar.
- Set Dark mode
- Make Google Chrome default browser
- Automatically hide and show Dock
- Show indicators for open applications
- Key Repeat -> Fast
- Delay Until Repeat -> Short
- Disable "Correct spelling automatically"
- Disable "Capitalize words automatically"
- Disable "Add period with double-space"
- Disable "Use smart quotes and dashes"
- Allow apps downloaded from App Store and identified developers
- Turn FileVault On (makes sure SSD is securely encrypted)
- Change computer name
- Make sure all file sharing is disabled
- Add "Rectangle" to Login items
A few more commands to change some defaults.
# Show Library folder chflags nohidden ~/Library # Show hidden files defaults write com.apple.finder AppleShowAllFiles YES # Show path bar defaults write com.apple.finder ShowPathbar -bool true # Show status bar defaults write com.apple.finder ShowStatusBar -bool true # Prevent left and right swipe through history in Chrome defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false
- Install uBlock Origin
- Install React DevTools
- Install Redux DevTools
- Install JSONView
- Install Duplicate Tab Shortcut
- Settings -> Set theme to "Dark"
CMD + SHIFT + Pand click "Install code command in PATH".
- View Dotfiles for keyboard shortcuts and settings
- Install New Moon Theme
- Install GitLens
- Install Highlight Matching Tag
- Install ESLint
- Install Prettier
- Install Jest
- Install Jest Runner
- Full Screen:
CMD + SHIFT + '(prevents messing with other commands)
- Left Half:
CMD + OPTION + LEFT
- Right Half:
CMD + OPTION + RIGHT
- Use ⌥← and ⌥→ to jump forwards / backwards
⌥←via "Send Escape Sequence" with
⌥→via "Send Escape Sequence" with
That sums it up for my current preferences on setting up a MacBook Pro. I hope it helped speed up your process or gave you ideas for the next time you're setting one up.