Shell for Instructors

Update - 09/09/2015

There is a Git repository at with a improved version of the script that made available here.

Software Carpentry is a non-profit that organize basic computer skill workshops mostly for people in academia hoping to make their lives easy.

At Software Carpentry’s workshops instructors taught the Unix Shell, Git/Mercurial (i.e. a version control system) and Python/R/MATLAB (i.e. a programming language). For the workshops that I attended, learners had a good time with Python/R/MATLAB in part because the graphical interface used in the workshops (IPython Notebook, RStudio, and MATLAB respectively) but some difficult with the Unix Shell and Git/Mercurial because they get lost very easily.

Preparing for the workshop at Federal University of Ceará, I decided to spend some time to script a terminal that will help learners following the lesson. If you want to test the script, you can get it here (I will probably create a Git repository for it) and you will need tmux.

Screenshot of the terminal at 800x600 using Gnome Terminal.


Thanks to Kate Hertweck for the tip at one of Software Carpentry’s debriefing sessions that I used when scripting the terminal.

Update - 20/06/2015

I think this was one of my best time teaching the Unix Shell. Most learners followed the lesson without problem that could be due my new configuration for the terminal but still need to use it again to have sure of that.


At the top of the terminal learners will find a window with the last 5 commands that the instructor typed. This way learners can always find the last command that the instructor typed even in the case that the output is longer than the terminal being used.


The history is saved at /tmp/log-file and can be shared using

$ cd /tmp/
$ python3 http.server

or Owncloud or Dropbox.

Commands Numbered

The prompt begin with the number of the command that will be type followed by `$. This way learners can know if they are at the same step of the instructor and if not they can get the commands they missed from the window at the top.


The prompt is cyan to make easy for learners find it. The choice for cyan is due:

  1. green and red are two colors used by Git and use the same color will not help, and
  2. blue doesn’t have a good contrast with black background.


Some common alias are disabled to be compatible with Software Carpentry lesson and drop colors to make easy for learners find the prompt. The alias disabled are

  • grep,
  • ls, and
  • sort.


Tmux doesn’t play very nice when you change the font size of Gnome Terminal and if you change it you will probably need to resize the windows.