Mini Shell
Build a working command-line shell from scratch in modern C++ using POSIX process APIs and the standard library. You read commands, tokenise them, launch programs with fork and execvp, and wire up pipes and redirection. A revealing project that shows how a shell really runs your programs.
Support Free C++ Education
Help us keep this platform free for everyone! Your support enables us to create more high-quality lessons, exercises, and interactive content.
What You'll Build
An interactive shell that runs external commands, supports built-ins like cd and exit, chains programs with pipes, and redirects input and output to files.
Learning Objectives
- Read and tokenise command lines into arguments
- Launch external programs with fork, execvp, and waitpid
- Implement built-in commands such as cd, pwd, and exit
- Connect commands with pipe and dup2 for pipelines
- Redirect standard input and output to files with open and dup2
- Handle child process exit status and error reporting
- Manage a read-eval-print loop with clean prompt handling
Coming Soon
This project is in development. Register your interest and we'll email you the moment it goes live.
No spam. Unsubscribe anytime.
Coming Soon
This project is in development. Register your interest and we'll email you the moment it goes live.
No spam. Unsubscribe anytime.