Skip to content

Instantly share code, notes, and snippets.

@ScottWales
Last active August 29, 2015 13:56
Show Gist options
  • Save ScottWales/9043871 to your computer and use it in GitHub Desktop.
Save ScottWales/9043871 to your computer and use it in GitHub Desktop.
Links & Info for the Unix course

Links

Local IT wiki:

Software Carpentry:

Shell Course:

The Basics

The shell is a text based interface for running programs. It allows for composition of multiple commands, for instance get a list of all files in a directory then do a find/replace on each one, and also allows you to save a list of commands in a script so the same process can be run multiple times, e.g. for multiple input files

The shell is accessed through a program called 'terminal' on your desktop. This is available by default on Linux and OSX, to use the shell commands on Windows you need to install a program called 'Cygwin'

There are multiple different shell types, syntax varies between them. The most used variants are 'bash' and 'tcsh'. Simple commands are mostly identical, loops and conditionals are quite different though. We'll be using 'bash' for this tutorial.

To see your current shell:

$ echo $SHELL
/bin/bash

(lines that start with $ are entered into the command line)

If you're currently using 'tcsh' change to bash:

$ bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment