This page describes how to make a clean setup of OS X on my mid-2012 MacBook Pro. It describes my favourite settings and Apps (adapted to this computer). A focus lies on open-source tools. It is a totally subjective selection. Feel free to fork.
This guide is based on my OS X experience and on a couple of other guides, including:
Ideally I use an install disk to boot from. DiskMakerX proved useful over the years. But Apple finally also introduced a tool for making OS X installer disks, called createinstallmedia
. So something like this should do:
sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ Yosemite.app
- Optional: Reset NVRAM and SMC - You wont believe what data is stored there...
- Boot the install disk by pressing alt at the boot screen
- Wipe the entire disk using Disk Utility. Make sure to use
HFS+ Journaled
and theGUID
partition table. - During installation create your
admin
account. - It is not necessary to setup iCloud or WiFi for installing OS X.
Create a user account user
(without admin rights) for everyday use. Not using the admin
account adds an additional security layer.
Home is where my .bash_profile
is. See below for goodies like iTerm2 and Homebrew.
TODO:
- bash_profile
- bash_alias
### Finder
- Make
~/Library
visible: - https://github.com/sindresorhus/quick-look-plugins
- On Macs with a non-Apple SSD, activate TRIM, using
sudo trimforce enable
. - Activate FileVault2 (Ideally leave the encryption process finish, before rebooting.)
Most settings like disk sleep, and display sleep can be set conveniently in System Preferences > Energy Saver
. For some things it is necessary to use pmset
. However, it is notoriously difficult to make a Mac sleep the way you want it to and pmset
does not always behave as expected. In my case standby
will kick in although hibernatemode
is set to 0, which, according to the pmset
manual, should not happen.
sudo pmset -b standbydelay 43200
- wait for 12 hours before hibernating, when on batterysudo pmset -c standbydelay 172800
- wait for 48 hours before hibernating, when on AC powersudo pmset -b autopoweroffdelay 720
- not sure about the difference betweenstandby
andautopoweroff
. Note this one is in minutes...sudo pmset -c autopoweroffdelay 2880
sudo pmset -a acwake 0
- do not wake the Mac when (un-) plugging the charger. This can be extremely annoying, especially with full disk encryption.
TODO
So the whole point of doing a clean install of OS X is that I do not want all the cruft that piled up over the years. So what I do:
- Create dummy user account
temp_user
- Run Migration Assistant from
temp_user
- Copy only the necessary files from
Users/temp_user/Library
toUsers/user/Library
- Correct permissions (i.e. from
temp_user
touser
)
- either use the the Recovery Assistant (cmd+R at boot screen),
- Onyx,
- command line, or
- file info (cmd+i on
Users/user/Library
). Make sure to click on 'apply on enclosed items'.
It is actually pretty difficult to restore a working Bootcamp image. There are tools like Winclone that claim to be able to do that. My one-time try did not prove successful, however. Usually I will do a clean re-install of Windows as well. The Bootcamp Assistant helps with the installation procedure.
First download most important Apps and Tools
- iTerm2
- Onyx
- Homebrew - see section below
- SmartSleep - includes some helpful sleeping tools and manages the hibernate file
- iStat Menus (commercial)
- KeePassX - Manage passwords
- pgAdmin3 - Manage postgresql databases
- Little Snitch (commercial) - OS X is talking a lot with its homebase...
- Firefox
- VPN Monitor (AppStore, commercial)
- pyCharm (commercial)
- Atom
- TextWrangler - powerful text editor
- GIMP - Photo editing at its best
- InkScape - Although not very well supported anymore (XQuartz), still a very valuable vector graphics tool.
- BackupLoupe - Investigate Time Machine backups
- LaTeX - Use BasicTEX, a much smaller version of MacTex and sufficient
One major inconvenience of Homebrew is that it is difficult to set up in multi user environments. Also setup for a non-Admin account requires more work. This guide explains a multi-user setup. Basically you will have to create a dedicated user group.
- Create a user group
brew
in System Preferences sudo chgrp -R brew /usr/local
sudo chmod -R g+w /usr/local
sudo chgrp -R brew /Library/Caches/Homebrew
sudo chmod -R g+w /Library/Caches/Homebrew
chgrp -R brew /opt/homebrew-cask
chmod -R g+w /opt/homebrew-cask
- sudo chown -R admin /opt/homebrew-cask
- sudo chmod -R g+w /opt/homebrew-cask
brew doctor
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Some of these will replace outdated OS X tools.
- bash
- coreutils
- findutils
- grep
- cowsay
- figlet
- afsctool - compress HFS+ files
- openssh - OS X uses a rather old version
- ssh-copy-id - copy a ssh key to the remote machine
- git
- postgresql - the only database you will ever need
- check_postgres
- postgis - Postgres GIS extension
- pgtune - Tuning utility for Postgres
- rsync
- rsnapshot
- netcat
- httrack - copy that website...
- joe - create
.gitignore
files
- Python
- numpy
- scipy
- matplotlib
TimeMachine is a very capable backup system.
TODO
It as always good to also have SuperDuper or Carbon Copy Cloner handy, e.g. for creating bootable images of your system.
~/Downloads