Lab 01 -- Basics of Shell scripting and Git
This page gives an overview of the lecture and the lab session on July 31, 2025.
Short lecture summary
-
Administrative information. Why is
0.1+0.2
is not0.3
according to python ?. Need for building a mental model of how a computer works (and the need to be update it along with the changing technology around us). Course objectives and outcomes. Unix (a brief history, Multics and the people involved), FOSS and four freedoms. Kernel, Operating System, Software distribution and differences between them. GNU and GCC. Writing code that is well maintained, well tested and performant. The Unix philosophy and developing a Hacker mindset. -
Need for automation and shell scripting. Everything is a file in Unix. Understanding file systems. Root
/
. Navigating files using the GUI file browser. Doing the same using a Terminal. A selected subset of linux commands and their effects. The (Bourne) bash shell. Effective ways of using shell. Manual pages. -
Basics of version control - Git. Why use Git. Cool features of Git. Create/Initialize a git repo; add files to a repo; commit changes to a repo. Also setting up username and email.
Readings
-
The Linux Command Line by William Shotts (Online version)
Read chapters (PDF available here)
- Chapter 1 - What is the shell ?
- Chapter 2 - Navigation
- Chapter 3 - Exploring the system
- Chapter 4 - Manipulating Files and Directories
- Chapter 5 - Working with Commands
-
Pro Git book by Scott Chacon and Ben Straub (Online version)
Read chapters
-
Dive Into Systems by Suzanne J. Matthews, Tia Newhall, Kevin C. Webb (Online version)
Read chapters
Practise
-
Watch and practise lecture recordings of the missing lectures.
- Lecture 1 - Course overview + the shell
- Lecture 2 - Shell Tools and Scripting
-
Work out the “shell novice” exercise completely from the software carpentry lectures appearing below (in “Additional readings”)
Additional readings
- Software Carpentry Lectures - Shell novice
- Unix Newbies Survival guide by Matt Might
- Basic Shell Programming
Online resources to better understand shell commands
- Clear explanation of shell commands typed in - explain shell
- The tldr pages.