Skip to main content

How to setup macOS Sonoma

Create Installation Disk

sudo /Applications/Install\ macOS\ --volume /Volumes/Disk --nointeraction


Install Apps, Utils, Libs

[ ! -e /usr/local/bin/brew ] && /bin/bash -c "$(curl -fsSL"
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/$USER/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
brew analytics off
brew install ansible git tig htop zsh npm iterm2 appcleaner signal telegram # Optional: ffmpeg ImageMagick
[ ! -e ~/.oh-my-zsh ] && /bin/bash -c "$(curl -fsSL"
brew install --cask docker visual-studio-code brave-browser

Configure System & User

# Manual Settings
# Right Sidebar, Medium, Weather + Screen Time.
# Control Centre, Bluetooth / AirDrop, Show in Menu Bar.
# Siri & Spotlight, Disable.
# Desktop & Dock, Disable the Quick Note from Hot Corners (bottom).
# Internet Accounts, disable all, except Contacts, iCloud.
# Trackpad, Enable Tap to click.
# Lock Screen, Require password immediately.
# Accessibility, Pointer Control, Trackpad Options, Enable dragging.
# Open Finder: New finder: "home". Sidebar: Show "home", Disable Tags.
# Open Brave: Default browser and configure it.
# General
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false # Text: Disable auto-correct
defaults write RichText -int 0 # TextEdit, Use plain text mode for new TextEdit documents
# Finder
defaults write _FXSortFoldersFirst -bool true # Keep folders on top when sorting by name
defaults write FXDefaultSearchScope -string "SCcf" # When performing a search, search the current folder by default
defaults write FXPreferredViewStyle -string "Nlsv" # Use list view in all Finder windows by default
# Dock
defaults write persistent-apps -array # Wipe all app icons from the Dock
defaults write tilesize -int 36 # Size
defaults write orientation -string "left" # Position on screen
defaults write minimize-to-application -bool true # Minimise windows into application icon
defaults write autohide -bool true # Automatically hide and show the Dock
defaults write show-recents -bool false # Show recent applications in Dock
killall Dock

Configure from GUI

  • Dock: Brave, iTerm2, Visual Studio Code.
  • Run & Give access to Docker (cmd+space).
  • Visual Studio Code, Install Extensions, vscode-icons, Markdown.
  • iTerm2, Show tab even when there is only one tab / Profiles, Terminal, Unlimited Scrollback.
  • Reboot after.

More Configs

zsh startup

git config --global "";
git config --global "Teo Cojocariu"
export HISTFILESIZE=5000000
export EDITOR=nano
sshkey() { ssh-keygen -b 4096 -N '' -f ~/.ssh/"$1".key -C "";cat ~/.ssh/"$1"; }


startup_message off
defscrollback 20000
altscreen on
defutf8 on
defnonblock on
caption always ' %H | %L=%-Lw%{= gW}%50> %n%f* %t %{-}%+Lw%< %-020='

ssh config

Host *
IdentitiesOnly yes
PasswordAuthentication yes
ControlMaster auto
ControlPath ~/.ssh/sockets_%r@%h:%p
ControlPersist yes
GatewayPorts yes

Port 22
User teo
IdentityFile ~/.ssh/id_ed25519
#LocalForward 9000
#LocalForward 8200
#StrictHostKeyChecking no
Port 22
User git
IdentityFile ~/.ssh/id_ed25519

Optional - Config Changes

# Save configs: `defaults read > 1.conf`.
# Change Config from GUI.
# Save & Check what configs changed: `defaults read > 2.conf; diff 1.conf 2.conf`.