“edit” and “read.table” on R for Mac

A quick way to install XQuartz is with homebrew via homebrew cask. The advantage of homebrew is that it's a full-on package manager, so it not only makes it easy to install things all in one place, but also makes it easy to keep them updated. And let's face it: Unless it's really easy, there's no way any of us will possibly keep git or curl or other things that don't self-update up-to-date, and for the sake of security we usually should.

If you're just getting started with homebrew, install it by copying the terminal command in the first link above. (It runs a script from the internet, so I won't copy it here so you at least know you're getting it from the source.) Once homebrew is installed, to add cask, just run

brew tap homebrew/cask

(only once ever) in the terminal and then to install XQuartz, just

brew install xquartz

More basic, useful commands:

brew help    # see available commands
brew update    # update internal list of packages and versions (including cask)
brew search git    # search for utilities and applications with "git" in the name
brew info git    # show package version, homepage URL, dependencies, options, etc.
brew install git    # install git
brew upgrade    # upgrade all outdated command-line utilities

brew cask help    # see available commands
brew cask install rstudio-preview    # install preview version of RStudio
brew cask upgrade    # upgrade outdated applications installed with cask

brew cleanup    # delete old, unneeded files downloaded by homebrew

Since brew and brew cask are so parallel, it's pretty easy to remember how they work (or find out if you forget). Everything is pretty reasonably named, too, although there is more of a difference between update and upgrade than the names imply.

Even if the command line still makes you nervous, homebrew is a pretty gentle (and useful!) introduction, and with cask, you can install easier-to-see things, e.g. iterm2 or flycut or font-fira-code or most any non-Apple app you have on your computer. Applications' self-update features work as usual, so for frequently-updated apps like firefox, it's more just a way to install, as the app will independently keep itself up-to-date.

Maybe my favorite part of brew is that it installs everything in /usr/local/Cellar, but symlinks everything to usr/local/bin, which is on $PATH by default, so you don't have to worry about managing it or ending up confused because the new tool you installed doesn't seem to be installed. If an install is complicated, the messages it generates will tell you if you may also want to take some other action. Basically, homebrew just makes life easier.

2 Likes