The Unix Shell

The Unix shell has been around longer than most of its users have been alive. It has survived so long because it’s a power tool that allows people to do complex things with just a few keystrokes. More importantly, it helps them combine existing programs in new ways and automate repetitive tasks so that they don’t have to type the same things over and over again. Use of the shell is fundamental to using a wide range of other powerful tools and computing resources (including “high-performance computing” supercomputers). These lessons will start you on a path towards using these resources effectively.

At the end of this lesson, you should know all of the basics of using a computer through the command-line and be able to use cloud computing resources like those hosted by HPCVL.

Prerequisites

This lesson assumes no prior knowledge of computers or programming.

Getting ready

On your own computer

If you are on Linux or OSX, open up a Terminal window and you will be set to go! If on Windows, please install Git Bash. Your instructor will show you how to install nano (a text editor) during the lesson (download the lesson example data, unpack, run install_nano.sh).

Once you have a terminal open up and ready to go, please download the example data for today’s lesson.

Remote access

All of the software for today’s lessons are preinstalled on the CAC systems. To connect to these systems, open up an SSH client (MobaXterm on Windows, Terminal on Linux/OSX). At the prompt, type the following then press Enter: ssh -X yourUserName@sfnode0.hpcvl.queensu.ca. You will be prompted for your password. Once you successfully enter your password, you will be on our system and ready to go!

Topics

  1. Introduction
  2. Moving around and looking at things
  3. Writing and reading files
  4. Wildcards and piping
  5. Shell scripts, variables, and loops
  6. Working remotely on a HPC cluster

Other Resources