Installation instructions

Last updated on 2026-03-23 | Edit this page

To go through the course material on your own or at a workshop, you will need the following software installed and working correctly on your system:

You will also need to create a GitHub account if you do not have one already, make sure that you are able to log into it, and download the Spacewalks data and analysis code which we will be used for exercises in the course.

We also provide “all in one setup check” to test everything works as expected.

Command line terminal


You will need a unix command line terminal (also referred to as a shell) in order to run some of the code in this workshop including various commands from tools such as Git and tools that interact with your filesystem.

Testing command line terminal

To test your command line terminal, start it up and type:

BASH

$ date

If your command line terminal is working - it should return the current date and time similar to:

OUTPUT

Wed 21 Apr 2021 11:38:19 BST

Git Version Control Tool


Git is a command line program that is run from within a command line terminal to provide version control for your work. Git is also used to interact with online code and project sharing platform GitHub.

Follow the installation instructions below, then proceed to test and configure Git on your machine in additional steps.

Testing Git

To test your Git installation, start your command line terminal and type:

BASH

$ git help

If your Git installation is working you should see something like:

OUTPUT

usage: git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           [--config-env=<name>=<envvar>] <command> [<args>]

These are common Git commands used in various situations:

start a working area (see also: git help tutorial)
   clone     Clone a repository into a new directory
   init      Create an empty Git repository or reinitialize an existing one

work on the current change (see also: git help everyday)
   add       Add file contents to the index
   mv        Move or rename a file, a directory, or a symlink
   restore   Restore working tree files
   rm        Remove files from the working tree and from the index

examine the history and state (see also: git help revisions)
   bisect    Use binary search to find the commit that introduced a bug
   diff      Show changes between commits, commit and working tree, etc
   grep      Print lines matching a pattern
   log       Show commit logs
   show      Show various types of objects
   status    Show the working tree status

grow, mark and tweak your common history
   branch    List, create, or delete branches
   commit    Record changes to the repository
   merge     Join two or more development histories together
   rebase    Reapply commits on top of another base tip
   reset     Reset current HEAD to the specified state
   switch    Switch branches
   tag       Create, list, delete or verify a tag object signed with GPG

collaborate (see also: git help workflows)
   fetch     Download objects and refs from another repository
   pull      Fetch from and integrate with another repository or a local branch
   push      Update remote refs along with associated objects

'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
See 'git help git' for an overview of the system.

Configuring Git

When you use Git on a machine for the first time, you also need to configure a few additional things:

  • your name,
  • your email address (the one you used to open your GitHub account with, which will be used to identify your commits),
  • preferred text editor for Git to use (e.g. Nano or another text editor of your choice),
  • the default branch name to be main (instead of master)
  • whether you want to use these settings globally (i.e. for every Git project on your machine) by using the --global option.

This can be done from a command line terminal as follows:

BASH

$ git config --global user.name "Your Name"
$ git config --global user.email "name@example.com"
$ git config --global core.editor "nano -w"
$ git config --global init.defaultBranch main

GitHub account


GitHub is a free, online host for Git repositories that you will use during the course to store your work in so you will need to open a free GitHub account unless you do not already have one.

Configuring GitHub account

In order to access GitHub using Git from your machine securely, you need to set up a way of authenticating yourself with GitHub through Git. The recommended way to do that for this course is to set up SSH authentication which requires a pair of keys - one public that you upload to your GitHub account, and one private that remains on your machine.

GitHub provides full documentation and guides on how to:

If you have already configured your SSH key with GitHub - you can skip this step (but make sure to test your setup by running ssh -T git@github.com command from the terminal).

A short summary of the commands you need to perform is shown below.

To generate an SSH key pair, you will need to run the ssh-keygen command line tool (included with your command line terminal) and provide your identity for the key pair (e.g. the email address you used to register with GitHub) via the -C parameter as shown below.

You will then be prompted to answer a few questions - e.g. where to save the keys on your machine and a passphrase to use to protect your private key. Pressing ‘Enter’ on these prompts will get ssh-keygen to use the default key location (within .ssh folder in your home directory) and set the passphrase to empty.

BASH

$ ssh-keygen -t ed25519 -C "your-github-email@example.com"

OUTPUT

Generating public/private ed25519 key pair.
Enter file in which to save the key (/Users/<YOUR_USERNAME>/.ssh/id_ed25519):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/<YOUR_USERNAME>/.ssh/id_ed25519
Your public key has been saved in /Users/<YOUR_USERNAME>/.ssh/id_ed25519.pub
The key fingerprint is:
SHA256:qjhN/iO42nnYmlpink2UTzaJpP8084yx6L2iQkVKdHk your-github-email@example.com
The key's randomart image is:
+--[ED25519 256]--+
|.. ..            |
| ..o A           |
|. o..            |
| .o.o .          |
| ..+ =  B        |
| .o = ..         |
|o..X *.          |
|++B=@.X          |
|+*XOoOo+         |
+----[SHA256]-----+

Next, you need to copy your public key (not your private key - this is important!) over to your GitHub account. The ssh-keygen command above will let you know where your public key is saved (the file should have the extension “.pub”), and you can get its contents from a command line terminal as follows:

BASH

$ cat /Users/<YOUR_USERNAME>/.ssh/id_ed25519.pub

OUTPUT

ssh-ed25519 AABAC3NzaC1lZDI1NTE5AAAAICWGVRsl/pZsxx85QHLwSgJWyfMB1L8RCkEvYNkP4mZC your-github-email@example.com

Copy the line of output that starts with “ssh-ed25519” and ends with your email address (it may start with a different algorithm name based on which one you used to generate the key pair and it may have gone over multiple lines if your command line terminal window is not wide enough).

Finally, go to your GitHub Settings -> SSH and GPG keys -> Add New page to add a new SSH public key. Give your key a memorable name (e.g. the name of the computer you are working on that contains the private key counterpart), paste the public key from your clipboard into the box labelled “Key” (making sure it does not contain any line breaks), then click the “Add SSH key” button.

To test if you can successfully authenticate to GitHub using your new key pair, do:

BASH

$ ssh -T git@github.com

You may be asked to add GitHub to the list of trusted hosts on your machine (say ‘yes’ to that) and then you should see a line similar to:

OUTPUT

Hi anenadic! You've successfully authenticated, but GitHub does not provide shell access.

R


You will need the statistical programming language R for this course. You may already have R installed on your system, in which case you do not have to do anything.

To download the latest R distribution for your operating system, please head to cran.

Testing R

You can check that you have R installed correctly from the command line terminal using the command below.

BASH

$ Rscript --version # on macOS/Linux

You should see something like the output below.

OUTPUT

Rscript (R) version 4.5.2 (2025-10-31)

RStudio


We will use Posit’s RStudio as an Integrated Development Environment (IDE) to type and execute R code and run command line terminal and Git commands.

Please make sure to download RStudio for your platform.

Windows - Set RStudio to use gitBash Terminal

  1. Open RStudio once it has been installed.
  2. Click on the Tools menu and choose Global Options…. Then choose the Terminal tab.
  3. Under “New terminals open with”, choose Git Bash. 
  4. Click OK.
  5. Open a new terminal: Tools → Terminal → New Terminal (or use the Terminal tab). If you already have a Terminal session open, close it and open a new one—some terminal options only apply to new sessions.

Spacewalks data and analysis code


You can download the spacewalks.zip archive from GitHub.

The archive contains NASA’s open data on spacewalks (i.e. extravehicular activities - EVAs) undertaken by astronauts and cosmonauts from 1965 to 2013 and a Python script to analyse and plot this data.

Save the spacewalks.zip archive to your home directory and extract it - you should get a directory called spacewalks.

Setup check (all in one)


Let’s check your setup now to make sure you are ready for the rest of this course.

Challenge

Check your setup (5 min)

From a command line terminal on your operating system or within RStudio run the following commands to check you have installed all the tools listed in the Setup page and that are functioning correctly.

From the the terminal within RStudio try the following commands.

Checking the command line terminal:

  1. $ date
  2. $ echo $SHELL
  3. $ pwd
  4. $ whoami

Checking R:

  1. $ R --version
  2. $ which R

Checking Git and GitHub:

  1. $ git --help
  2. $ git config --list
  3. $ ssh -T git@github.com

Checking R and RStudio:

  1. Open RStudio and confirm it opens correctly.
  2. View the R version printed in the console pane

The expected out put of each command is:

  1. Today’s date
  2. bash or zsh - this tells you what shell language you are using. In this course we show examples in Bash.
  3. Your “present working directory” or the folder where your shell is running
  4. Your username
  5. Something like Rscript (R) version 4.5.2 (2025-10-31), it might be a slightly different version but as long as it is 4.X.X+ it should be okay. It will also print a little bit more descriptive message after this.
  6. The file path to where the R version you are calling is installed.
  7. The help message explaining how to use the git command.
  8. You should have user.name, user.email and core.editor set in your Git configuration. Check that the editor listed is one you know how to use.
  9. This checks if you have set up your connection to GitHub correctly. If is says permission denied you may need to look at the instructions for setting up SSH keys again on the Setup page.
  10. RStudio should open and show no errors.
  11. (the version should be 4.X.X, if it starts with 3 or earlier then you will need to follow the directions above to update R and likely RStudio).