Install Ubuntu

Ubuntu Linux is a great programming environment but it’s more difficult to initially set up than macOS or Windows.
  1. Install dependencies
  2. Install Git
  3. Install R
  4. Preferences
    1. Reverse scrolling

Install dependencies

sudo apt-get install \
    g++ \
    gfortran \
    libcurl4-openssl-dev \
    libssh2-1-dev \
    libssl-dev \

Install Git

curl -s | sudo bash
sudo apt-get install git git-lfs
git lfs install

Install R

Add the CRAN GPG key, which is used to sign the R packages for security.

sudo apt-key adv \
    --keyserver \
    --recv-keys E084DAB9

Append the CRAN repository to sources.list.

sudo sh -c 'echo "deb trusty/" >> /etc/apt/sources.list'

Install the latest version of R.

sudo apt-get update
sudo apt-get install r-base


Reverse scrolling

Create a file named .Xmodmap:

pointer = 1 2 3 5 4 6 7 8 9 10 11 12

Note that 4 and 5 are flipped here – this enables reverse vertical scrolling.