Summary and Schedule
The Unix shell has been around longer than most of its users have been alive. It has survived because it’s a powerful tool that allows users to perform complex and powerful tasks, often with just a few keystrokes or lines of code. It helps users automate repetitive tasks and easily combine smaller tasks into larger, more powerful workflows.
Use of the shell is fundamental to a wide range of advanced computing tasks, including high-performance computing. These lessons will introduce you to this powerful tool.
Prerequisites
This lesson guides you through the basics of file systems and the shell. If you have stored files on a computer at all and recognize the word “file” and either “directory” or “folder” (two common words for the same thing), you’re ready for this lesson.
Setup Instructions | Download files required for the lesson | |
Duration: 00h 00m | 1. Introducing the Shell | What is a command shell and why would I use one? |
Duration: 00h 05m | 2. Navigating Files and Directories |
How can I move around on my computer? How can I see what files and directories I have? How can I specify the location of a file or directory on my computer? |
Duration: 00h 45m | 3. Working With Files and Directories |
How can I create, copy, and delete files and directories? How can I edit files? |
Duration: 01h 35m | 4. Pipes and Filters |
How can I combine existing commands to produce a desired output? How can I show only part of the output? |
Duration: 02h 10m | 5. Loops | How can I perform the same actions on many different files? |
Duration: 03h 00m | 6. Shell Scripts | How can I save and re-use commands? |
Duration: 03h 45m | 7. Finding Things |
How can I find files? How can I find things in files? |
Duration: 04h 30m | Finish |
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
Setup
Logging into Rivanna/Afton
To log into the Rivanna or Afton HPC cluster, start by visiting the
HPC Login Instructions page:
https://www.rc.virginia.edu/userinfo/hpc/login/
Follow the instructions for Secure Shell Access (SSH) based on your operating system:
-
Windows: Install the recommended SSH client,
MobaXterm, by clicking the Install MobaXterm
button under the Windows section of the page and following the
instructions.
-
macOS: Open the Terminal
application, located in the Utilities folder.
- On macOS Mojave and earlier, the default shell is
Bash.
- On macOS Catalina and later, the default shell is
Zsh. To temporarily switch to Bash, open Terminal, type
bash
, and press Return.
- On macOS Mojave and earlier, the default shell is
Bash.
-
Linux: Most Linux systems use Bash
as the default shell. Open a terminal using the Applications menu or
search bar (look for Terminal,
Konsole, or xterm). If your system
defaults to another shell, you can switch by typing
bash
and pressing Return.
Once you have a terminal open, connect to the HPC cluster by typing:
Replace uva_compute_id
with your UVA computing ID. You
will then be prompted to enter your UVA NetBadge password.
Data Access for This Lesson
Before we start, let’s make sure you are in your home directory. In the terminal, type:
and press Return.
The data for this lesson is stored in the folder:
Let’s copy this folder into your home directory so you can work with your own copy. Run the following command:
Don’t worry about the details of this command yet. We will explain how it works later in the lesson.