View on GitHub

Introduction to the Unix Shell

fredhutch.io's four-class intro to the Unix shell and command line

Unix Shell Crash Course

This tutorial covers basic Unix (aka shell, command line) concepts required as pre-requisites for other fredhutch.io courses, like RNAseq analysis. It is not intended to be a replacement for the complete Introduction to Unix course. This material is also a convenient cheatsheet for participants enrolled in more advanced courses.

Before proceeding with these training materials, please ensure you have access to a Unix shell on your computer.

By the end of this crash course, you should be able to:

Getting set up

Open the software you’ll be using to access the Unix shell (Mac: Terminal, Windows: WSL or Git Bash).

We can run our first Unix command by typing the following into the shell window:

whoami

logging on to rhino

Download project:

On Linux:

wget https://raw.githubusercontent.com/fredhutchio/unix_shell_intro/master/example_unix_project.zip

Unzip project, inspecting contents of folder before and after:

ls
unzip example_unix_project.zip
ls

where am I in my computer?

pwd

What things are in this place in my computer?

ls

Change working directory to project:

cd Desktop/

relative vs absolute paths

. and ..

flags

ls -F

Do spaces matter?

ls -a

shared network drives (accessing fast)

popout explaining other ways to access home and fast

Working with files and directories

working with files (head, mv, cp, rm, etc)

in-shell text editor (nano)

Automating tasks

Wrapping up