Why Use a Cluster?
|
High Performance Computing (HPC) typically involves connecting to very large computing systems elsewhere in the world.
These HPC systems can be used to do work that would either be impossible or much slower or smaller systems.
The standard method of interacting with such systems is via a command line interface such as Bash.
|
Connecting to the remote HPC system
|
To connect to a remote HPC system using SSH and a password, run ssh [email protected] .
To connect to a remote HPC system using SSH and an SSH key, run ssh -i ~/.ssh/key_for_remote_computer [email protected] .
|
Moving around and looking at things
|
Your current directory is referred to as the working directory.
To change directories, use cd .
To view files, use ls .
You can view help for a command with man command or command --help .
Hit tab to autocomplete whatever you’re currently typing.
|
Writing and reading files
|
Use nano to create or edit text files from a terminal.
Use cat file1 [file2 ...] to print the contents of one or more files to the terminal.
Use mv old dir to move a file or directory old to another directory dir .
Use mv old new to rename a file or directory old to a new name.
Use cp old new to copy a file under a new name or location.
Use cp old dir copies a file old into a directory dir .
Use rm old to delete (remove) a file.
File extensions are entirely arbitrary on UNIX systems.
|
Wildcards and pipes
|
The * wildcard is used as a placeholder to match any text that follows a pattern.
Redirect a command’s output to a file with > .
Commands can be chained with |
|
Scripts, variables, and loops
|
A shell script is just a list of bash commands in a text file.
To make a shell script file executable, run chmod +x script.sh .
|