---
title: "Unix and Shell Basics on the HPC"
canonical: "https://kb.uconn.edu/space/SH/27970109455/Unix%20and%20Shell%20Basics%20on%20the%20HPC"
format: markdown
---
## Preface

We understand everyone comes from different backgrounds of tech literacy. A lot of users are proficient in one or multiple coding languages while others are entering into the world of programming for the first time. This page is meant to be a guide that is a quick refresher, with links to more robust resources for those that are new and want to learn more.

## Introduction for new users

In the earliest days of computing, computers were not interactive at all. Instead, punched cards or tapes were submitted to the machine, which would run the code overnight with the printout being collected the next morning. In the 60s, development began for command line interfaces (CLIs), and in the 70s, Unix shells were developed and became ubiquitous in consumer electronics. While largely replaced by graphical interfaces in the 90s, Unix shells remain the standard for high-performance computing due to their efficient functionality. 

In a graphical interface (e.g. Windows, MacOS), your instructions to the computer are delivered by interacting with specific elements using your keyboard and mouse; for example, programs are closed by clicking the [X] at the top. In a CLI, your instructions to the computer are delivered by typing and entering commands. 

Learning these commands can be challenging, as it is essentially learning a new language. In fact, Unix shells are programming languages (most commonly `bash`). Becoming proficient takes time, but once you’re through, you’ll have powerful analyses at the tips of your fingertips. When dealing with files, for example, bash can often do the job of a full Python script in only one or two commands.

Our favorite resource for learning the Unix Shell is a free online course offered by Software Carpentry. It’ll give you a foundation in everything you need to know to use the Unix Shell.

Please run through the course linked below:

[The Unix Shell: Summary and Setup](https://swcarpentry.github.io/shell-novice/)

## What if I just want a quick refresher?

### UNIX Command Flash Cards:

If you just want to test your memory of common Unix commands, we recommend this set of command line flash cards.

[Introduction Flashcards · Flashcards for Developers | flashcards.github.io](https://flashcards.github.io/command_line/introduction.html)

### UNIX Quick Reference:

We’ve also created this quick reference on common Unix shell commands. You can also download the file here:  

![unix_quick_reference.png](media://da6d30c1-ab7d-4893-ab17-36a28ebe187d)

## Logging in to the HPC

Now that we have discussed the basics of the command line, we are finally ready to log into the HPC!

Log in to the cluster using your [SSH client](https://uconn.atlassian.net/wiki/spaces/SH/pages/27633025066) (replace with your NetID):

```
ssh -Y netID@hpc2.storrs.hpc.uconn.edu
```

When prompted for your password, use your NetID login. Don’t be alarmed if no text appears – your password is hidden while you’re typing it. After this, there will be a quick Duo prompt.

Once you get through the security prompts, you should see a terminal output like this:

```
Welcome to the Storrs HPC cluster.
If you need technical support, please read the wiki or email us at hpc@uconn.edu
[netID@login4 ~]$ 
```

> 📝 **Want to avoid the DUO security prompt that activates every time you logon to the cluster?** We recommend that you set up and use [SSH Keys](https://uconn.atlassian.net/wiki/spaces/SH/pages/27104772140), which have improved security and allow users to login without entering their password. 🙂 You can do this any time.

> ℹ️ **Next:** [https://uconn.atlassian.net/wiki/spaces/SH/pages/28016050215](https://uconn.atlassian.net/wiki/spaces/SH/pages/28016050215)