2 macOS minimal setup for Intel machines
2.1 Check and Update Apple ID
This helps with warranty repair and sharing among multiple Apple devices. It should be the first item in the list under > System Settings…
2.2 Open Finder
Go to Settings > Advanced > Show all file extensions
2.3 Open System Settings
This is the first menu item on the Apple () menu.
- keyboard > keyboard shortcuts > modifier keys > change caps-lock to ctrl
- desktop and dock > automatically hide and show the dock
- desktop and dock > automatically hide and show menubar on desktop (if no notch)
- desktop and dock > change Magnification to Large
- trackpad > More gestures > Swipe between pages > three fingers
2.4 Install XCode
Do this from the macOS app store, which is the third menu item under the Apple () menu.
Installation takes a million years! Make sure you have some time or can leave the computer running.
Be sure to open XCode after install to initialize and possibly to install command line utilities. (It used to make you install command line utilities but I already did that so I can’t tell if the current version is not making me do it because I have it installed or because it’s no longer required.)
2.5 Figure out your processor
Open > About this Mac, and look under processor—if it says M1 or M2, you’re in the wrong file! Use the file macSetupM1Full for all the remaining instructions. To use this file, the processor entry should include the word Intel.
2.6 Install Homebrew
For this you will use the terminal. You can find the macOS default terminal by opening the Finder and navigating to /Applications/Utilities
. There are many useful programs in that folder, arranged alphabetically. Navigate to Terminal.app and double click it.
Enter the following commands in the terminal. You should be able to copy and paste them from this list to avoid transcription errors.
Note that everything from a hashmark (#) to the end of the line is regarded as a comment and is not processed. I just include those comments for your information.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval $(/usr/local/bin/brew shellenv)
brew install bash # the shell that will process all your cli commands
sudo pico /etc/shells # add /usr/local/bin/bash to the list in that file
chsh -s /usr/local/bin/bash # makes bash the default shell
brew install quicksilver # simplifies opening programs
brew install iterm2 # terminal replacement; when our setup is complete we will use it instead of terminal
brew install hammerspoon # controls window placement on screen
2.7 Install basic brew packages
This installation process is tedious but informative. If you prefer, there is a utility file in Canvas > Files > misc > basicBrewPackages.sh that does all of these at once. Beware, though, that you may miss important messages that way.
brew install python # keeps Python more up-to-date than native macOS python
pip3 install powerline-status # gives a better command prompt
brew install coreutils # replaces basic cli utilities with enhanced versions
brew install findutils # enhancements for the Unix find utility
brew install ruby # installs a more recent version of ruby than the native macOS version
gem install colorls # gives color-coded filenames when invoking ls
gem install github-pages # utilities for website building
brew install tmux # a terminal multiplexer
brew install rename # simplifies pattern renaming of files
brew install macvim # both gui and cli version of the vim editor
brew install pandoc # converts documents between platforms such as qmd, pdf, html, docx, epub, and more
pip3 install pandoc-include # enables including markdown documents in other markdown documents (not for Quarto, just plain markdown)
brew install pandoc-include-code # enables including program files in markdown documents (not for Quarto, just plain markdown)
brew install quarto # scientific document and presentation system
brew install trash # enables a command line trash function
brew install clipy # improves clipboard management
brew install saulpw/vd/visidata # cli csv file manager
brew install gnu-tar # improved archive management
brew install grep # improved regular expression search
brew install bib-tool # manages bibliography files created with bibtex or biblatex
brew install font-tex-gyre-schola # font used by quarto
brew install font-tex-gyre-schola-math # font used by quarto
brew install font-jetbrains-mono-nerd-font # font used by quarto
Most of these installations also install a man
page or at least a help file. For example, you can say
man trash
to get information about the trash
utility. The man
pages have a specialized, hard-to-grasp format if you’re new to them, so you may want to check out the man
module before making extensive use of them.
For those programs that have no man
page, you can usually say <name of command> --help
to get a help page. For instance, you can say
quarto --help
to get some brief help for using the cli version of Quarto. Of course, Quarto also has a web page at https://quarto.org/ that gives much more information about it.
2.8 Install R and RStudio
Google the letter R. Usually, the first hit is the R project: https://www.r-project.org/
You have to choose a mirror to download from. I usually choose USA: National Institute for Computational Sciences, Oak Ridge, TN
Be sure to choose Intel X86 when given a choice
You will download a package installer. Double-click it in Finder and follow the instructions
Google RStudio. Usually, the first hit is Posit’s RStudio download site: https://posit.co/products/open-source/rstudio/
After clicking various links to download RStudio Desktop, you should eventually get to a page with the .dmg file to download. That page is https://posit.co/download/rstudio-desktop/ so you can visit it directly if you prefer. (I don’t know why they make you click through so many pages if you don’t have that URL!)
Download the .dmg file.
Double-click the .dmg file in the Finder. You should see a window with an Applications folder and the RStudio.app.
Drag the RStudio.app icon to the Applications folder. This is very important. If you try to open the RStudio.app icon from this window, you will not be able to save your work!
Eject the disk image that will appear in Finder that generates this window after RStudio.app is successfully added to your Applications folder.
2.9 Weekly maintenance
I usually put the following commands in a file called ~/weeklyMaintenance
and sometimes run them as a group if I don’t want to look at the output of each one. More often, I run them individually and examine the output for items of interest, such as error messages or special package instructions.
brew update # updates brew's concept of what's available
brew upgrade # actually upgrades whatever brew now knows to be available
pip-upgrade # upgrades Python packages
Rscript -e 'update.packages()' # upgrades R packages
Note that pip-upgrade
is actually a shell function. Its definition is in my .bash_profile
file, which can be found in Canvas > Files > misc. This command will not work without that definition.