Egor Demidov

Using a computational cluster

This tutorial is an introduction on how to start using a linux-based computational cluster from the command line of your device. It covers some basic aspects: generating a log in key pair, logging in and navigating the system, and transferring files between the remote system and your device. The approaches discussed here should work on any client system - Windows, macOS, or linux.

Linux, macOS, and recent releases of Windows usually have an ssh client enabled by default. To confirm this, run ssh in the terminal. If the result of this command is not a “command not found” message, you are good to proceed with this tutorial. Otherwise, it is necessary to configure an ssh client on your system before continuing the tutorial.

If you are doing this tutorial on Windows, it is necessary to use PowerShell and not the cmd.exe command line.

Cluster hostnames
Illinois cluster: login.delta.ncsa.illinois.edu
NJIT cluster: wulver.njit.edu
Must be connected to NJIT VPN to access the NJIT cluster

To log in to the remote machine, run the following command:

ssh <username>@<hostname>

<username> should be replaced by the name assigned to you by the system administrator and <hostname> should be replaced by the web address of the remote machine. When done with the session, make sure to log out and terminate your session by running:

exit

Once logged in to the remote machine, the command line will be initialized in the home directory. The command line is like a file browser - it lets you create, move, open, and delete files on the computer. To switch between folders, manipulate files, and run programs, text commands need to be typed into the terminal. Here I provide a reference list of some of the most fundamental commands that you will need while working with a linux machine.

ls command

Mnemoniclist
Actionlist files in the current directory
Argumentsnone

pwd command

Mnemonicprint working directory
Actionprint the path of the current directory
Argumentsnone

cd command

Mnemonicchange directory
Actionmove into another directory
Argumentspath or none
NotesIf a directory name or a complex path is provided, opens the specified directory. If used without arguments, returns to the home directory
Example: return to homecd
Example: move to parent directorycd ..
Example: open directory my_directorycd my_directory
Example: open a pathcd /usr/bin

mv command

Mnemonicmove
Actionmove or rename file
Arguments(1) old path, (2) new path
NotesIf you want to move a file from some source directory to the current directory, the second argument should be a dot .
Example: rename file my_file.txtmv my_file.txt readme.txt
Example: move file my_file.txt and rename itmv ~/Downloads/my_file.txt readme.txt
Example: move file my_file.txt without renaming itmv ~/Downloads/my_file.txt .

cp command

Mnemoniccopy
Actioncopy file
Arguments(1) old path, (2) new path
Example: copy file my_file.txt to readme.txtmv my_file.txt readme.txt

rm command

Mnemonicremove
Actiondelete file
Argumentspath
Example: delete file my_file.txtrm my_file.txt
Example: delete directory my_directoryrm -r my_directory

mkdir command

Mnemonicmake directory
Actioncreate directory
Argumentspath
Example: create directory my_directorymkdir my_directory

cat command

Mnemonicconcatenate
Actionprint the contents of the file
Argumentspath
Example: print file my_file.txtcat my_file.txt

wget command

Mnemonicweb get
Actiondownload file from internet
ArgumentsURL
Example: download the source code of soot-demwget https://github.com/egor-demidov/soot-dem/archive/refs/tags/v2.tar.gz

There are many more essential and convenience commands in linux, but these will help you get started. Refer to web resources for other commands. Some useful commands to learn next would be the archive manipulation commands (zip, unzip, tar) or text manipulation commands (vi, nano).

Copying files to/from the cluster

To copy files to/from the remote computer, the scp command needs to be used from the client device. The scp command is similar in syntax to cp, except it can copy files over the internet using the ssh protocol. If the source or destination path is on the remote host, it needs to be prefixed with <username>@<hostname>:.

For example to copy the file my_file.txt from the cluster, I would use:

scp <username>@<hostname>:/home/egor/my_file.txt .

To copy a local file my_file.txt from my device to the cluster I would use:

scp my_file.txt <username>@<hostname>:/home/egor/my_file.txt

Alternatively, Windows users can use MobaXterm, which is a program that combines an ssh-capable terminal for logging into a remote machine and a graphical interface for file transfer between the remote and the client. Thus, you can just use the drag and drop semantics to exchange files with the remote machine. MobaXterm would need to be configured to log in using your private key instead of password-based authentication, which is enabled by default.

Copyright © 2025 Egor Demidov. Content on this website is made available under the CC BY 4.0 licence where not specified otherwise. Attribute Egor Demidov and the co-authors as indicated