Setting up a terminal

Below you find some links that help you in setting up a Bash command line depending on your operating system:

Linux

The default shell is usually Bash and there is no need to install anything to be able to follow this tutorial. On most versions of Linux, the shell accessible by running the Gnome Terminal or KDE Konsole or xterm, which can be found via the applications menu or the search bar. If your machine is set up to use something other than Bash, you should be able to switch the shell by opening a terminal and typing bash.

Mac

For Mac running macOS Mojave or earlier releases, the default Unix Shell is Bash. For a Mac computer running macOS Catalina or later releases, the default Unix Shell is Zsh. To open a terminal, try one or both of the following:

  • In Finder, select the Go menu, then select Utilities. Locate Terminal in the Utilities folder and open it.
  • Use the Mac ‘Spotlight’ computer search function. Search for: Terminal and press Return.

To ensure that you work with a consistent shell and to check if your machine is set up to use something other than Bash, type echo $SHELL in your terminal window. The name of the current shell should be printed to the terminal window.

If your machine is set up to use something other than Bash, you can try switching to Bash by opening a terminal and typing bash. To check if that worked type echo $SHELL again.

Windows

Operating systems like macOS and Linux come with a native command-line terminal, making it straightforward to run bash commands. However, for Windows users you need to install some software first to be able to use bash, below you find three options:

One option to access the bash shell commands is using Git Bash, for detailed installation instructions please have a look at the carpenties website.

A second option is Mobaxterm, which enables Windows users to execute basic Linux/Unix commands on their local machine, connect to an HPC with SSH and to transfer files with SCP/SFTP (more on that later). Installation instructions can be found here.

A final option is to use Windows and Linux at the same time on a Windows machine. The Windows Subsystem for Linux (WSL2) lets users install a Linux distribution (such as Ubuntu, which is the default Linux distribution, which we recommend to use) and use Linux applications, utilities, and Bash command-line tools directly on Windows. This option allows you to use all the tools available but since you more or less are installing a separating system on your PC needs to have enough memory to run this. Installation instructions can be found here.

Notice: The code found on these pages was run on a windows machine using WSL2 and on a Linux machine.

After you set everything up and opened a terminal you should see something like this and are good to go if you want to follow the tutorial:

Putty/GIS study to connect to an HPC

If you don’t need Bash on your computer and/or have trouble setting up a Bash terminal but want to analyze your data on an HPC that you already have access to, you can use the SSH-client Putty on the GIS studio computers.

The GIS-studio was established in 2003 to serve staff and students of the Institute for Biodiversity and Ecosystem Dynamics (IBED) of the University of Amsterdam and to assist them in their spatial data analysis using Geographical Information Systems (GIS) and remote sensing (RS) software. You can also use these computers to connect to an HPC.

More information on accessing the IBED Crunchomics HPC can be found here. If its your first time using bash and/or an HPC, it is recommended to look at this mini-tutorial.

To access to the GIS-studio computers:

  1. Go to the GIS-studio website
  2. Click on ORS PC reservations
  3. Click on “ORS sheet 2024” and request access if you don’t already have it
  4. After reserving a computer and starting it up find the Putty application
  5. In the Host Name field, enter the hostname of the HPC you want to connect to. For example, for the UvA Crunchomics HPC, you would enter: UvanetID@omics-h0.science.uva.nl
  6. Click “open”
  7. Enter your UvanetID passport
  8. You are now connected to the HPC