Bash Self-Test for Talapas
The first day of this workshop is spent reviewing essential filesystem skills and Bash commands. If you’re already a command-line expert but new to Talapas, you can skip ahead to Thursday’s lesson, which will be conducted on Talapas. We’d be happy to have you either way!
If you’ve been using Talapas and Slurm for a while now, confirm you have access to the racs_training pirg using the groups command. You can choose to start next week or join us for a refresher on Bash.
This self-test will give you a chance to decide if and how much to skip ahead.
Prerequisite: Confirm Talapas Access
Open a connection to a Talapas login node at [duckID]@login.talapas.uoregon.edu through either an SSH client (Terminal, Putty (Windows), Git Bash, Command Prompt) or through the Shell application on OnDemand.
SSH Client Route: ssh [duckID]@login.talapas.uoregon.edu
- Enter your DuckID password when prompted
Web Browser Route:
- Navigate to ondemand.talapas.uoregon.edu
- Log in via DuckID
- Go to Clusters -> Talapas Shell Access
- A new browser tab will open with a terminal
If you are not able to access Talapas, stop here. Please contact @emwin to make sure you are added to Talapas in time for Thursday’s session.
Introduction to Bash - Oct. 14th
General Knowledge
- What is the difference between a relative path and an absolute path?
- Why is knowledge of Bash required for using Talapas?
Bash
- Confirm that you are in your home directory on Talapas by printing your current working directory.
- To avoid modifying the source materials for future exercises, make a new folder inside your home directory called
IntroHPC2025. - Copy the
/projects/racs_training/intro-hpc-f25/talapas-check/folder (with its contents) toIntroHPC2025.- If you cannot access the
/projects/racs_trainingdirectory, you are not a member of the racs_training PIRG. Please contact @emwin to make sure you are added before Thursday.
- If you cannot access the
- Change your working directory to the
IntroHPC2025directory. - Change your working directory to
talapas-checksubfolder. - Make a new file in the command line text editor of your choice (nano, vim, emacs, etc.) named
README.txtwith the words “My new file” inside. - Output (concatenate) the contents of your
README.txtto the terminal. - The contents of Shakespeare’s The Tempest are contained in
tempest.txt. Use a Bash command to print the last 2 lines of the play.
Bash Scripting on Talapas - Oct. 16th
General Knowledge:
- Talapas has four login nodes. What Bash command could you use to determine which of the four login nodes you’ve connected to?
- What is the difference between a login node and a compute node?
Bash
- Inspect the permissions of the contents of the
talapas-checkdirectory. - Do you have permission to execute
a-little-script.sh? How can you tell? - Modify the
a-little-script.shto be executable - Before running
a-little-script.sh, print its contents to the terminal - What does this first line of this script mean?
- Run
a-little-script.sh(it’s not a real Slurm job or doing real work, so it’s fine to run on the login node) - Using output redirection, find all the lines in
tempest.txtthat contain the word “queen”.
Want to check your work? Here’s our answer key.