Strange Loop

Let's build a shell!

We all use shells a lot. For many of us, they're our primary interface to the computer. Even so, their workings can be mysterious.

In this workshop I'll walk you through building a basic shell for a unix-like OS. Along the way, we'll pick up a good deal of knowledge about how our operating system works. From contents of kernel structures for processes, to what happens when a new process launches. We'll even learn just why cd and export have to be shell builtins!

Materials will assume C as the development language, but any language that has access to the fork, exec*, open, pipe system calls can be used.

Kamal Marhubi

Kamal Marhubi


Kamal Marhubi is a polyglot programmer who works for Google in Montreal, where he helps keep the internet clean and malware-free. He once wrote a game AI in Haskell, and after five years of being an emacs user, he's now the organiser of vimtl. He is not-so-secretly addicted to English change-ringing, and has rung the bells of over twenty churches in England, Canada, and the US.